annotate gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
kono
parents:
diff changeset
3 /* { dg-additional-options "-mbranch-cost=1" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 _Bool f1(_Bool a, _Bool b)
kono
parents:
diff changeset
6 {
kono
parents:
diff changeset
7 if (a)
kono
parents:
diff changeset
8 {
kono
parents:
diff changeset
9 if (b)
kono
parents:
diff changeset
10 return 1;
kono
parents:
diff changeset
11 else
kono
parents:
diff changeset
12 return 0;
kono
parents:
diff changeset
13 }
kono
parents:
diff changeset
14 return 0;
kono
parents:
diff changeset
15 }
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 /* There should be only one if, the outer one; the inner one
kono
parents:
diff changeset
19 should have been changed to straight line code with the
kono
parents:
diff changeset
20 value of b (except that we don't fold ! (b != 0) into b
kono
parents:
diff changeset
21 which can be fixed in a different patch).
kono
parents:
diff changeset
22 Test this only when known to be !LOGICAL_OP_NON_SHORT_CIRCUIT,
kono
parents:
diff changeset
23 otherwise ifcombine may convert this into return a & b;. */
kono
parents:
diff changeset
24 /* { dg-final { scan-tree-dump-times "if" 1 "optimized" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } } */