tree-optimization/107935 - fixup equivalence handling in PHI VN
authorRichard Biener <rguenther@suse.de>
Thu, 1 Dec 2022 08:01:20 +0000 (09:01 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 1 Dec 2022 09:18:46 +0000 (10:18 +0100)
commit8629f212af0acb113879d0bc45291c54743790f1
tree0705ee3348fa1a29ba809124d4da1352c6982589
parent2c089640279614e34b8712bfb318a9d4fc8ac8fe
tree-optimization/107935 - fixup equivalence handling in PHI VN

The following makes sure to honor the backedge processing logic
that forces VARYING there.

PR tree-optimization/107935
* tree-ssa-sccvn.cc (visit_phi): Honor forced VARYING on
backedges.

* gcc.dg/torture/pr107935.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr107935.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc