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
2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
slsr-11.c
blob
1483d300c9baae362f8965e9d6c97ef3b3e6a988
1
/* Verify straight-line strength reduction for simple integer addition
2
with casts thrown in. */
3
4
/* { dg-do compile } */
5
/* { dg-options "-O3 -fdump-tree-optimized" } */
6
7
long
8
f
(
int
s
,
long
c
)
9
{
10
int
a1
,
a2
,
a3
;
11
long
x1
,
x2
,
x3
,
x
;
12
13
a1
=
2
*
s
;
14
x1
=
c
+
a1
;
15
a2
=
4
*
s
;
16
x2
=
c
+
a2
;
17
a3
=
6
*
s
;
18
x3
=
c
+
a3
;
19
x
=
x1
+
x2
+
x3
;
20
return
x
;
21
}
22
23
/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */