repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
xtensa: constantsynth: Add new 3-insns synthesis pattern
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
xtensa
/
constsynth_3insns.c
blob
831288c7ddd56a17eb03e2cf5aa902faf7907809
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -mextra-l32r-costs=3" } */
3
4
int
test_0
(
void
)
5
{
6
return
134217216
;
7
}
8
9
int
test_1
(
void
)
10
{
11
return
-
27604992
;
12
}
13
14
int
test_2
(
void
)
15
{
16
return
-
162279
;
17
}
18
19
void
test_3
(
int
*
p
)
20
{
21
*
p
=
192437
;
22
}
23
24
struct
foo
25
{
26
unsigned int
b
:
10
;
27
unsigned int
g
:
11
;
28
unsigned int
r
:
11
;
29
};
30
void
test_4
(
struct
foo
*
p
,
unsigned int
v
)
31
{
32
p
->
g
=
v
;
33
}
34
35
/* { dg-final { scan-assembler-not "l32r" } } */