gnu /
gcc /
b9e703f0b42b2a86c9e18cd12497a0c19d2eb96c 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.
(cherry picked from commit 52b53cfb5392257536fce8dd22ea60412ceaee7d)
2 files changed