1 /* PR tree-optimization/66299 */
2 /* { dg-do run } */
3 /* { dg-options "-fdump-tree-original" } */
4
5 void __attribute__ ((noinline, noclone))
6 test1 (int x)
7 {
8 if ((2 << x) == 1
9 || (8 << x) == 1
10 || (8 << x) == 2
11 || (3072 << x) == 3
12 || (294912 << x) == 9
13 || (45056 << x) == 11
14 || (2176 << x) == 17)
15 __builtin_abort ();
16 }
17
18 void __attribute__ ((noinline, noclone))
19 test2 (int x)
20 {
21 if ((2 << x) != 1
22 && (8 << x) != 1
23 && (8 << x) != 2
24 && (3072 << x) != 3
25 && (294912 << x) != 9
26 && (45056 << x) != 11
27 && (2176 << x) != 17)
28 ;
29 else
30 __builtin_abort ();
31 }
32
33 void __attribute__ ((noinline, noclone))
34 test3 (int x)
35 {
36 if ((3 << x) == 4
37 || (1 << x) == 12
38 || (40 << x) == 1024
39 || (2 << x) == 84
40 || (3 << x) == 16384
41 || (10 << x) == 6144)
42 __builtin_abort ();
43 }
44
45 void __attribute__ ((noinline, noclone))
46 test4 (int x)
47 {
48 if ((3 << x) != 4
49 && (1 << x) != 12
50 && (40 << x) != 1024
51 && (2 << x) != 84
52 && (3 << x) != 16384
53 && (10 << x) != 6144)
54 ;
55 else
56 __builtin_abort ();
57 }
58
59 int
60 main (void)
61 {
62 test1 (0);
63 test2 (1);
64 test3 (1);
65 test4 (2);
66 }
67
68 /* { dg-final { scan-tree-dump-not "(<<|==|!=)" "original" } } */