]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/122016 - PRE insertion breaks abnormal coalescing
authorRichard Biener <rguenther@suse.de>
Mon, 22 Sep 2025 08:14:31 +0000 (10:14 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 22 Sep 2025 09:42:28 +0000 (11:42 +0200)
commit52b53cfb5392257536fce8dd22ea60412ceaee7d
tree517123b4e6918fd22e686e82fe492fa8dc670898
parent32a8a1c26bd0bf340ab4a5138b694d4102290a2e
tree-optimization/122016 - PRE insertion breaks abnormal coalescing

When PRE asks VN to simplify a NARY but not insert, that bypasses
the abnormal guard in maybe_push_res_to_seq and we blindly accept
new uses of abnormals.  The following fixes this.

PR tree-optimization/122016
* tree-ssa-sccvn.cc (vn_nary_simplify): Do not use the
simplified expression when it references abnormals.

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