Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-2.c
blob3d34ef3f638b1bf9b3bc45aae12a5d3ce1ce7b44
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
3 /* { dg-additional-options "-mbranch-cost=1" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } */
5 _Bool f1(_Bool a, _Bool b)
7 if (a)
9 if (b)
10 return 1;
11 else
12 return 0;
14 return 0;
18 /* There should be only one if, the outer one; the inner one
19 should have been changed to straight line code with the
20 value of b (except that we don't fold ! (b != 0) into b
21 which can be fixed in a different patch).
22 Test this only when known to be !LOGICAL_OP_NON_SHORT_CIRCUIT,
23 otherwise ifcombine may convert this into return a & b;. */
24 /* { dg-final { scan-tree-dump-times "if" 1 "optimized" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } } */
25 /* { dg-final { cleanup-tree-dump "optimized" } } */