1 /* PR tree-optimization/88676 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-not " = PHI <" "optimized" } } */
5
6 void bar (int, int, int);
7
8 __attribute__((noipa)) int
f1(unsigned x)9 f1 (unsigned x)
10 {
11 int r;
12 if (x >= 2)
13 __builtin_unreachable ();
14 switch (x)
15 {
16 case 0:
17 r = 1;
18 break;
19 case 1:
20 r = 2;
21 break;
22 default:
23 r = 0;
24 break;
25 }
26 return r;
27 }
28
29 __attribute__((noipa)) void
f2(int x)30 f2 (int x)
31 {
32 int y;
33 x = (x & 1) + 98;
34 if (x != 98)
35 y = 115;
36 else
37 y = 116;
38 bar (x, y, 116);
39 }
40
41 __attribute__((noipa)) void
f3(int x)42 f3 (int x)
43 {
44 int y;
45 x = (x & 1) + 98;
46 if (x == 98)
47 y = 115;
48 else
49 y = 116;
50 bar (x, y, 115);
51 }
52
53 __attribute__((noipa)) void
f4(int x)54 f4 (int x)
55 {
56 int y;
57 x = (x & 1) + 98;
58 if (x != 99)
59 y = 115;
60 else
61 y = 116;
62 bar (x, y, 115);
63 }
64
65 __attribute__((noipa)) void
f5(int x)66 f5 (int x)
67 {
68 int y;
69 x = (x & 1) + 98;
70 if (x == 99)
71 y = 115;
72 else
73 y = 116;
74 bar (x, y, 116);
75 }
76
77 __attribute__((noipa)) void
f6(int x)78 f6 (int x)
79 {
80 int y;
81 x = (x & 1) + 98;
82 if (x != 98)
83 y = 116;
84 else
85 y = 115;
86 bar (x, y, 115);
87 }
88
89 __attribute__((noipa)) void
f7(int x)90 f7 (int x)
91 {
92 int y;
93 x = (x & 1) + 98;
94 if (x == 98)
95 y = 116;
96 else
97 y = 115;
98 bar (x, y, 116);
99 }
100
101 __attribute__((noipa)) void
f8(int x)102 f8 (int x)
103 {
104 int y;
105 x = (x & 1) + 98;
106 if (x != 99)
107 y = 116;
108 else
109 y = 115;
110 bar (x, y, 116);
111 }
112
113 __attribute__((noipa)) void
f9(int x)114 f9 (int x)
115 {
116 int y;
117 x = (x & 1) + 98;
118 if (x == 99)
119 y = 116;
120 else
121 y = 115;
122 bar (x, y, 115);
123 }
124
125 __attribute__((noipa)) int
f10(int x)126 f10 (int x)
127 {
128 x = (x & 1) + 36;
129 if (x == 36)
130 return 85;
131 else
132 return 84;
133 }
134