IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / iftrap-1.c
blob142782042a52346adaac6f45a60138b6dc02ac70
1 /* Verify that we optimize to conditional traps. */
2 /* { dg-options "-O" } */
3 /* { dg-do compile { target rs6000-*-* powerpc*-*-* sparc*-*-* ia64-*-* } } */
4 /* { dg-final { scan-assembler-not "^\t(trap|ta|break)\[ \t\]" } } */
6 void f1(int p)
8 if (p)
9 __builtin_trap();
12 void f2(int p)
14 if (p)
15 __builtin_trap();
16 else
17 bar();
20 void f3(int p)
22 if (p)
23 bar();
24 else
25 __builtin_trap();
28 void f4(int p, int q)
30 if (p)
32 bar();
33 if (q)
34 bar();
36 else
37 __builtin_trap();