1 /* PR tree-optimization/79472 */
2 /* { dg-options "-O2 -fdump-tree-switchconv" } */
10 if (x
!= expected
[0] || y
!= expected
[1])
15 __attribute__((noinline
, noclone
)) void
67 __attribute__((noinline
, noclone
)) void
116 __attribute__((noinline
, noclone
)) void
155 __attribute__((noinline
, noclone
)) void
260 #define T(call, cnt, ...) \
261 expected = e = (int []) __VA_ARGS__; \
263 if (expected != e + cnt) \
265 T (f1 (171, 1), 2, { 129, 128 });
266 T (f1 (140, 1), 2, { 129, 128 });
267 T (f1 (170, 0), 2, { 27, 7 });
268 T (f1 (171, 0), 2, { 8, 122 });
269 T (f1 (172, 0), 2, { 21, -19 });
270 T (f1 (173, 0), 2, { 18, 17 });
271 T (f1 (174, 0), 2, { 139, -5 });
272 T (f1 (175, 0), 2, { 14, -26 });
273 T (f1 (176, 0), 2, { -14, 5 });
274 T (f1 (177, 0), 2, { 12, 8 });
275 T (f2 (-31), 6, { 5, 12, 17, 19, 8, 19 });
276 T (f2 (169), 6, { 5, 12, 17, 19, 8, 19 });
277 T (f2 (170), 2, { 27, 7 });
278 T (f2 (171), 2, { 8, 122 });
279 T (f2 (172), 2, { 21, -19 });
280 T (f2 (173), 2, { 18, 17 });
281 T (f2 (174), 2, { 139, -5 });
282 T (f2 (175), 2, { 14, -26 });
283 T (f2 (176), 2, { -14, 5 });
284 T (f2 (177), 2, { 12, 8 });
285 T (f2 (178), 6, { 5, 12, 17, 19, 8, 19 });
286 T (f2 (231), 6, { 5, 12, 17, 19, 8, 19 });
287 T (f3 (-31), 2, { -31, -5 });
288 T (f3 (169), 2, { 169, -5 });
289 T (f3 (170), 2, { 27, -5 });
290 T (f3 (171), 2, { 8, -5 });
291 T (f3 (172), 2, { 21, -5 });
292 T (f3 (173), 2, { 18, -5 });
293 T (f3 (174), 2, { 139, -5 });
294 T (f3 (175), 2, { 14, -5 });
295 T (f3 (176), 2, { -14, -5 });
296 T (f3 (177), 2, { 12, -5 });
297 T (f3 (178), 2, { 178, -5 });
298 T (f3 (231), 2, { 231, -5 });
299 T (f4 (171, 1), 8, { 0, 0, 5, 12, 17, 19, 8, 45 });
300 T (f4 (140, 1), 8, { 0, 0, 5, 12, 17, 19, 8, 45 });
301 T (f4 (-31, 0), 6, { 5, 12, 17, 19, 8, 24 });
302 T (f4 (169, 0), 6, { 5, 12, 17, 19, 8, 24 });
303 T (f4 (170, 0), 2, { 27, 12 });
304 T (f4 (171, 0), 2, { 8, 127 });
305 T (f4 (172, 0), 2, { 21, -14 });
306 T (f4 (173, 0), 2, { 18, 22 });
307 T (f4 (174, 0), 2, { 139, 0 });
308 T (f4 (175, 0), 2, { 14, -21 });
309 T (f4 (176, 0), 2, { -14, 10 });
310 T (f4 (177, 0), 2, { 12, 13 });
311 T (f4 (178, 0), 6, { 5, 12, 17, 19, 8, 24 });
312 T (f4 (231, 0), 6, { 5, 12, 17, 19, 8, 24 });
313 T (f5 (171, 1), 4, { 23, 0, 129, 0 });
314 T (f5 (140, 1), 4, { 23, 0, 129, 0 });
315 T (f5 (-31, 0), 2, { 80, 0 });
316 T (f5 (169, 0), 2, { 80, 0 });
317 T (f5 (170, 0), 2, { 27, 0 });
318 T (f5 (171, 0), 2, { 8, 0 });
319 T (f5 (172, 0), 2, { 21, 0 });
320 T (f5 (173, 0), 2, { 18, 0 });
321 T (f5 (174, 0), 2, { 139, 0 });
322 T (f5 (175, 0), 2, { 14, 0 });
323 T (f5 (176, 0), 2, { -14, 0 });
324 T (f5 (177, 0), 2, { 12, 0 });
325 T (f5 (178, 0), 2, { 80, 0 });
326 T (f5 (231, 0), 2, { 80, 0 });
329 /* { dg-final { scan-tree-dump-times "Switch converted" 5 "switchconv" } } */
330 /* { dg-final { scan-tree-dump-times "= CSWTCH" 8 "switchconv" } } */