blob: 377a9e48bbf9e673ac67e5ccd7a2e636ed831206 (
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
36
37
38
39
40
41
42
|
/* PR tree-optimization/64454 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1 -fno-ipa-icf" } */
unsigned
f1 (unsigned x)
{
return (x % 5) % 5;
}
int
f2 (int x)
{
return (x % 5) % 5;
}
int
f3 (int x)
{
return (x % -5) % -5;
}
unsigned
f4 (unsigned x)
{
return (x % 5) % 6;
}
int
f5 (int x)
{
return (x % 5) % 6;
}
int
f6 (int x)
{
return (x % -5) % -6;
}
/* { dg-final { scan-tree-dump-times "% 5" 6 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "% 6" 0 "vrp1" } } */
|