aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-01-30 09:25:23 +0100
committerRichard Biener <rguenther@suse.de>2023-01-30 10:50:52 +0100
commit7ac3e69e311351b70407d7f87a0169c4d463e57b (patch)
tree3435a90ad55baa9432ac21daaa9f636b25629661 /gcc/tree-ssa-phiopt.cc
parent3cd08f7168c196d7a481b9ed9f4289fd1f14eea8 (diff)
downloadgcc-7ac3e69e311351b70407d7f87a0169c4d463e57b.zip
gcc-7ac3e69e311351b70407d7f87a0169c4d463e57b.tar.gz
gcc-7ac3e69e311351b70407d7f87a0169c4d463e57b.tar.bz2
tree-optimization/108574 - wrong-code with PRE PHI node processing
The PR108523 was too optimistic in replacing the same value with an equivalence from a possibly not taken edge. The following rectifies this and instead refrains from using the equivalence in the problematic cases. PR tree-optimization/108574 * tree-ssa-sccvn.cc (visit_phi): Instead of swapping sameval and def, ignore the equivalence if there's the danger of oscillating between two values. * gcc.dg/torture/pr108574-1.c: New testcase. * gcc.dg/torture/pr108574-2.c: Likewise. * gcc.dg/torture/pr108574-3.c: Likewise.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions