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
Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
20150120-1.c
blob
18906c47a0974cc74d2bf56d0cdf786aef32aabc
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-original" } */
3
4
/* x + (x & 1) -> (x + 1) & ~1 */
5
int
6
fn1
(
int
x
)
7
{
8
return
x
+ (
x
&
1
);
9
}
10
int
11
fn2
(
int
x
)
12
{
13
return
(
x
&
1
) +
x
;
14
}
15
int
16
fn3
(
int
x
)
17
{
18
return
x
+ (
1
&
x
);
19
}
20
int
21
fn4
(
int
x
)
22
{
23
return
(
1
&
x
) +
x
;
24
}
25
unsigned int
26
fn5
(
unsigned int
x
)
27
{
28
return
x
+ (
x
&
1
);
29
}
30
unsigned int
31
fn6
(
unsigned int
x
)
32
{
33
return
(
x
&
1
) +
x
;
34
}
35
unsigned int
36
fn7
(
unsigned int
x
)
37
{
38
return
x
+ (
x
%
2
);
39
}
40
unsigned int
41
fn8
(
unsigned int
x
)
42
{
43
return
(
x
%
2
) +
x
;
44
}
45
unsigned int
46
fn9
(
unsigned int
x
)
47
{
48
return
(
1LL
&
x
) +
x
;
49
}
50
51
/* { dg-final { scan-tree-dump-times "x \\+ 1" 9 "original" } } */