]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/107107 - tail-merging VN wrong-code
authorRichard Biener <rguenther@suse.de>
Thu, 6 Oct 2022 09:20:16 +0000 (11:20 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 6 Oct 2022 10:07:21 +0000 (12:07 +0200)
commit85333b9265720fc4e49397301cb16324d2b89aa7
treea0d49cc7eb2e1284a5d04b0b44393cba1aca22ea
parent544d14e1b42eeb337fcefb1efe9d108e71a06d52
tree-optimization/107107 - tail-merging VN wrong-code

The following fixes an unintended(?) side-effect of the special
MODIFY_EXPR expression entries we add for tail-merging during VN.
We shouldn't value-number the virtual operand differently here.

PR tree-optimization/107107
* tree-ssa-sccvn.cc (visit_reference_op_store): Do not
affect value-numbering when doing the tail merging
MODIFY_EXPR lookup.

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