blob: 5f6e9d956f096bb87f457c6947fdd23ed65cf1e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-ccp -fno-tree-forwprop -fdump-tree-vrp1" } */
int f(int x)
{
if (x >= 0 && x <= 3)
{
x = x ^ 3;
x = x & 3;
}
return x;
}
int g(int x)
{
if (x >= 0 && x <= 3)
{
x = x ^ 2;
x = x & 3;
}
return x;
}
int h(int x)
{
if (x >= 0 && x <= 3)
{
x = x ^ 1;
x = x & 3;
}
return x;
}
/* { dg-final { scan-tree-dump-not " & 3;" "vrp1" } } */
|