annotate gcc/testsuite/gcc.dg/pr42631.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* The function below expands to a loop whose latch block starts with
kono
parents:
diff changeset
2 a PHI node and the corresponding debug stmt. In RTL, there are no
kono
parents:
diff changeset
3 PHI nodes, but the debug insn that references the incoming k
kono
parents:
diff changeset
4 remains, even though one of the incoming edges has it
kono
parents:
diff changeset
5 uninitialized. After unrolling, however, the debug insn becomes
kono
parents:
diff changeset
6 unconditional, and this exposed a problem in the webizer. Because
kono
parents:
diff changeset
7 DF doesn't combine the uses of an uninitialized pseudo into a
kono
parents:
diff changeset
8 single UD chain, we created a separate web for each use.
kono
parents:
diff changeset
9 Allocating separate registers or stack slots for each uninitialized
kono
parents:
diff changeset
10 use is wasteful, but the problem became more apparent in
kono
parents:
diff changeset
11 -fcompare-debug tests: register numbers went out of sync, and could
kono
parents:
diff changeset
12 have caused codegen differences depending on whether or not the
kono
parents:
diff changeset
13 debug insns were present. The fix was to arrange for web to
kono
parents:
diff changeset
14 combine uninitialized uses into a single web. */
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 /* { dg-do compile } */
kono
parents:
diff changeset
17 /* { dg-options "-g -O1 -funroll-loops -fcompare-debug" } */
kono
parents:
diff changeset
18 /* { dg-xfail-if "" { powerpc-ibm-aix* } } */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 void foo()
kono
parents:
diff changeset
21 {
kono
parents:
diff changeset
22 unsigned k;
kono
parents:
diff changeset
23 while (--k > 0);
kono
parents:
diff changeset
24 }