1 /* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
2
3 /* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
4 /* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
5
test(int a,int b,int c)6 int test (int a, int b, int c)
7 {
8 if (a == 43 || a == 75 || a == 44 || a == 78
9 || a == 77 || a == 46 || a == 76 || a == 45)
10 return b;
11 else
12 return c;
13 }
14
15 int
main()16 main ()
17 {
18 volatile int n43, n47, n75, n79;
19 n43 = 43; n47 = n43 + 4; n75 = 75; n79 = n75 + 4;
20 int i;
21 for (i = -10; i <= 100; i++)
22 if (test (i, 2, 3) != 3 - ((i >= n43 && i < n47) || (i >= n75 && i < n79)))
23 __builtin_abort ();
24 return 0;
25 }
26 /* { dg-final { scan-tree-dump-times "Optimizing range tests" 3 "reassoc1"} }*/
27 /* { dg-final { cleanup-tree-dump "reassoc1" } } */
28