annotate gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 /* { dg-options "-O1 -fdump-tree-optimized --param logical-op-non-short-circuit=0" } */
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 _Bool f1(_Bool a, _Bool b)
kono
parents:
diff changeset
5 {
kono
parents:
diff changeset
6 if (a)
kono
parents:
diff changeset
7 {
kono
parents:
diff changeset
8 if (b)
kono
parents:
diff changeset
9 return 1;
kono
parents:
diff changeset
10 else
kono
parents:
diff changeset
11 return 0;
kono
parents:
diff changeset
12 }
kono
parents:
diff changeset
13 return 0;
kono
parents:
diff changeset
14 }
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 /* There should be only one if, the outer one; the inner one
kono
parents:
diff changeset
18 should have been changed to straight line code with the
kono
parents:
diff changeset
19 value of b (except that we don't fold ! (b != 0) into b
kono
parents:
diff changeset
20 which can be fixed in a different patch).
kono
parents:
diff changeset
21 Test this only when known to be !LOGICAL_OP_NON_SHORT_CIRCUIT,
kono
parents:
diff changeset
22 otherwise ifcombine may convert this into return a & b;. */
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
23 /* { dg-final { scan-tree-dump-times "if" 1 "optimized" } } */