1 /* { dg-do run { target { ! "m68k*-*-* mmix*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-*"} } } */
2
3 /* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
4 /* { dg-additional-options "-mbranch-cost=2" { target branch_cost } } */
5
6
test(int a,int b,int c)7 int test (int a, int b, int c)
8 {
9 if ( a == 10 || a == 12 || a == 26)
10 return b;
11 else
12 return c;
13 }
14
main()15 int main ()
16 {
17 if (test (10, 20, 30) != 20)
18 __builtin_abort ();
19 if (test (12, 20, 30) != 20)
20 __builtin_abort ();
21 if (test (26, 20, 30) != 20)
22 __builtin_abort ();
23 if (test (30, 20, 30) != 30)
24 __builtin_abort ();
25 return 0;
26 }
27
28 /* { dg-final { scan-tree-dump-times "Optimizing range tests .* 26" 1 "reassoc1"} }*/
29