aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c
blob: 252bea67f996cd706fbe03393311f6968ad3f565 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */

int isMyRandomCharacter(int aChar)
{
  return aChar == 0x0001 || aChar == 0x000A ||
         aChar == 0x000C || aChar == 0x000E ||
         aChar == 0x0020;
}

/* { dg-final { scan-tree-dump "Condition chain with \[^\n\r]\* BBs transformed into a switch statement." "iftoswitch" } } */