1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-tree-switch-conversion -fdump-tree-vrp1" } */
3
4 extern void vrp_keep (void);
5
6 /* Test <<. */
7
8 void
f3(int s,int b)9 f3 (int s, int b)
10 {
11 if (s >> 3 == -2)
12 /* s in range [-16, -9]. */
13 {
14 s += 17;
15 /* s in range [1, 8]. */
16 b = (b & 1) + 1;
17 /* b in range [1, 2]. */
18 b = b << s;
19 /* b in range [bmin << smin, bmax << smax],
20 == [1 << 1, 2 << 8]
21 == [2, 512]. */
22 if (b == 2)
23 vrp_keep ();
24 if (b == 512)
25 vrp_keep ();
26 }
27 }
28
29 int
main()30 main ()
31 {
32 return 0;
33 }
34
35 /* { dg-final { scan-tree-dump-times "vrp_keep \\(" 2 "vrp1"} } */
36
37
38