blob: 4b806c475b1c32c8ab1ff148dabc04f696941360 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-optimized -fno-tree-ch" } */
int foo (int a)
{
do
{
if (a == 1)
return 0;
switch (a)
{
case 1:
return 5;
case 2:
return 7;
case 3:
return 11;
default:;
}
}
while (1);
}
/* { dg-final { scan-tree-dump-times "unswitching loop" 3 "unswitch" } } */