blob: 963282a2a82f54c405fe541736fa179bc7a21fc1 (
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
35
|
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-ccp -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" } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
|