1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-ipa-icf -fdump-tree-vrp1" } */
3
4 extern void arf (unsigned x, unsigned y);
5 extern void baz (unsigned x, unsigned y);
6
7 unsigned
f1(unsigned a,unsigned b)8 f1 (unsigned a, unsigned b)
9 {
10 b = a + 1;
11 if (b < a)
12 {
13 arf (a, b);
14 return 42;
15 }
16 baz (a, b);
17 return b;
18 }
19
20
21 unsigned
f1r(unsigned a,unsigned b)22 f1r (unsigned a, unsigned b)
23 {
24 b = a + 1;
25 if (a < b)
26 {
27 baz (a, b);
28 return 42;
29 }
30 arf (a, b);
31 return b;
32 }
33
34 unsigned
f1n(unsigned a,unsigned b)35 f1n (unsigned a, unsigned b)
36 {
37 b = a + 1;
38 if (!(b < a))
39 {
40 baz (a, b);
41 return 42;
42 }
43 arf (a, b);
44 return b;
45 }
46
47 unsigned
f1nr(unsigned a,unsigned b)48 f1nr (unsigned a, unsigned b)
49 {
50 b = a + 1;
51 if (!(a < b))
52 {
53 arf (a, b);
54 return 42;
55 }
56 baz (a, b);
57 return b;
58 }
59
60
61 unsigned
f1o(unsigned a,unsigned b)62 f1o (unsigned a, unsigned b)
63 {
64 b = a + 1;
65 if (a < b)
66 {
67 baz (a, b);
68 return 42;
69 }
70 arf (a, b);
71 return b;
72 }
73
74 unsigned
f1ro(unsigned a,unsigned b)75 f1ro (unsigned a, unsigned b)
76 {
77 b = a + 1;
78 if (b < a)
79 {
80 arf (a, b);
81 return 42;
82 }
83 baz (a, b);
84 return b;
85 }
86
87 unsigned
f1no(unsigned a,unsigned b)88 f1no (unsigned a, unsigned b)
89 {
90 b = a + 1;
91 if (!(a < b))
92 {
93 arf (a, b);
94 return 42;
95 }
96 baz (a, b);
97 return b;
98 }
99
100 unsigned
f1nro(unsigned a,unsigned b)101 f1nro (unsigned a, unsigned b)
102 {
103 b = a + 1;
104 if (!(b < a))
105 {
106 baz (a, b);
107 return 42;
108 }
109 arf (a, b);
110 return b;
111 }
112
113
114 unsigned
f2(unsigned a,unsigned b)115 f2 (unsigned a, unsigned b)
116 {
117 b = a + 1;
118 if (b <= a)
119 {
120 arf (a, b);
121 return 42;
122 }
123 baz (a, b);
124 return b;
125 }
126
127 unsigned
f2r(unsigned a,unsigned b)128 f2r (unsigned a, unsigned b)
129 {
130 b = a + 1;
131 if (a <= b)
132 {
133 baz (a, b);
134 return 42;
135 }
136 arf (a, b);
137 return b;
138 }
139
140 unsigned
f2n(unsigned a,unsigned b)141 f2n (unsigned a, unsigned b)
142 {
143 b = a + 1;
144 if (!(b <= a))
145 {
146 baz (a, b);
147 return 42;
148 }
149 arf (a, b);
150 return b;
151 }
152
153 unsigned
f2nr(unsigned a,unsigned b)154 f2nr (unsigned a, unsigned b)
155 {
156 b = a + 1;
157 if (!(a <= b))
158 {
159 arf (a, b);
160 return 42;
161 }
162 baz (a, b);
163 return b;
164 }
165
166
167 unsigned
f2o(unsigned a,unsigned b)168 f2o (unsigned a, unsigned b)
169 {
170 b = a + 1;
171 if (a <= b)
172 {
173 baz (a, b);
174 return 42;
175 }
176 arf (a, b);
177 return b;
178 }
179
180 unsigned
f2ro(unsigned a,unsigned b)181 f2ro (unsigned a, unsigned b)
182 {
183 b = a + 1;
184 if (b <= a)
185 {
186 arf (a, b);
187 return 42;
188 }
189 baz (a, b);
190 return b;
191 }
192
193 unsigned
f2no(unsigned a,unsigned b)194 f2no (unsigned a, unsigned b)
195 {
196 b = a + 1;
197 if (!(a <= b))
198 {
199 arf (a, b);
200 return 42;
201 }
202 baz (a, b);
203 return b;
204 }
205
206 unsigned
f2nro(unsigned a,unsigned b)207 f2nro (unsigned a, unsigned b)
208 {
209 b = a + 1;
210 if (!(b <= a))
211 {
212 baz (a, b);
213 return 42;
214 }
215 arf (a, b);
216 return b;
217 }
218
219
220 unsigned
f3(unsigned a,unsigned b)221 f3 (unsigned a, unsigned b)
222 {
223 b = a - 1;
224 if (b < a)
225 {
226 baz (a, b);
227 return 42;
228 }
229 arf (a, b);
230 return b;
231 }
232
233 unsigned
f3r(unsigned a,unsigned b)234 f3r (unsigned a, unsigned b)
235 {
236 b = a - 1;
237 if (a < b)
238 {
239 arf (a, b);
240 return 42;
241 }
242 baz (a, b);
243 return b;
244 }
245
246 unsigned
f3n(unsigned a,unsigned b)247 f3n (unsigned a, unsigned b)
248 {
249 b = a - 1;
250 if (!(b < a))
251 {
252 arf (a, b);
253 return 42;
254 }
255 baz (a, b);
256 return b;
257 }
258
259 unsigned
f3nr(unsigned a,unsigned b)260 f3nr (unsigned a, unsigned b)
261 {
262 b = a - 1;
263 if (!(a < b))
264 {
265 baz (a, b);
266 return 42;
267 }
268 arf (a, b);
269 return b;
270 }
271
272
273 unsigned
f3o(unsigned a,unsigned b)274 f3o (unsigned a, unsigned b)
275 {
276 b = a - 1;
277 if (a < b)
278 {
279 arf (a, b);
280 return 42;
281 }
282 baz (a, b);
283 return b;
284 }
285
286 unsigned
f3ro(unsigned a,unsigned b)287 f3ro (unsigned a, unsigned b)
288 {
289 b = a - 1;
290 if (b < a)
291 {
292 baz (a, b);
293 return 42;
294 }
295 arf (a, b);
296 return b;
297 }
298
299 unsigned
f3no(unsigned a,unsigned b)300 f3no (unsigned a, unsigned b)
301 {
302 b = a - 1;
303 if (!(a < b))
304 {
305 baz (a, b);
306 return 42;
307 }
308 arf (a, b);
309 return b;
310 }
311
312 unsigned
f3nro(unsigned a,unsigned b)313 f3nro (unsigned a, unsigned b)
314 {
315 b = a - 1;
316 if (!(b < a))
317 {
318 arf (a, b);
319 return 42;
320 }
321 baz (a, b);
322 return b;
323 }
324
325
326 unsigned
f4(unsigned a,unsigned b)327 f4 (unsigned a, unsigned b)
328 {
329 b = a - 1;
330 if (b <= a)
331 {
332 baz (a, b);
333 return 42;
334 }
335 arf (a, b);
336 return b;
337 }
338
339 unsigned
f4r(unsigned a,unsigned b)340 f4r (unsigned a, unsigned b)
341 {
342 b = a - 1;
343 if (a <= b)
344 {
345 arf (a, b);
346 return 42;
347 }
348 baz (a, b);
349 return b;
350 }
351
352 unsigned
f4n(unsigned a,unsigned b)353 f4n (unsigned a, unsigned b)
354 {
355 b = a - 1;
356 if (!(b <= a))
357 {
358 arf (a, b);
359 return 42;
360 }
361 baz (a, b);
362 return b;
363 }
364
365 unsigned
f4nr(unsigned a,unsigned b)366 f4nr (unsigned a, unsigned b)
367 {
368 b = a - 1;
369 if (!(a <= b))
370 {
371 baz (a, b);
372 return 42;
373 }
374 arf (a, b);
375 return b;
376 }
377
378
379 unsigned
f4o(unsigned a,unsigned b)380 f4o (unsigned a, unsigned b)
381 {
382 b = a - 1;
383 if (a <= b)
384 {
385 arf (a, b);
386 return 42;
387 }
388 baz (a, b);
389 return b;
390 }
391
392 unsigned
f4ro(unsigned a,unsigned b)393 f4ro (unsigned a, unsigned b)
394 {
395 b = a - 1;
396 if (b <= a)
397 {
398 baz (a, b);
399 return 42;
400 }
401 arf (a, b);
402 return b;
403 }
404
405 unsigned
f4no(unsigned a,unsigned b)406 f4no (unsigned a, unsigned b)
407 {
408 b = a - 1;
409 if (!(a <= b))
410 {
411 baz (a, b);
412 return 42;
413 }
414 arf (a, b);
415 return b;
416 }
417
418 unsigned
f4nro(unsigned a,unsigned b)419 f4nro (unsigned a, unsigned b)
420 {
421 b = a - 1;
422 if (!(b <= a))
423 {
424 arf (a, b);
425 return 42;
426 }
427 baz (a, b);
428 return b;
429 }
430
431 /* All calls to baz should still reference a & b as arguments. */
432 /* { dg-final { scan-tree-dump-times "baz \\(a_\[0-9\]+\\(D\\), b_\[0-9\]+\\)" 32 "vrp1"} } */
433
434
435 /* All calls to arf should have constant arguments. */
436 /* { dg-final { scan-tree-dump-times "arf \\(\[0-9\]+, \[0-9\]+\\)" 32 "vrp1"} } */
437