comparison gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do run { target { ! "m68k*-*-* mmix*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*"} } } */
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
6 int test (int a, int b, int c)
7 {
8 if (a == 10 || a == 12)
9 return b;
10 else
11 return c;
12 }
13 int main ()
14 {
15 if (test (10, 20, 30) != 20)
16 __builtin_abort ();
17 if (test (12, 20, 30) != 20)
18 __builtin_abort ();
19 if (test (26, 20, 30) != 30)
20 __builtin_abort ();
21 return 0;
22 }
23 /* { dg-final { scan-tree-dump-times "Optimizing range tests" 1 "reassoc1"} }*/