diff options
author | Richard Biener <rguenther@suse.de> | 2025-08-12 09:00:48 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-08-12 10:19:46 +0200 |
commit | a440b382e43203857de9195eb526c4a16f21ceb1 (patch) | |
tree | 3777397e20e27509a8e713787968e1cade9a852e /gcc/testsuite/gm2/iso/run/pass/constbool4.mod | |
parent | 2fe432175ef135037dea210002881a093f328779 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
When inserting a compensation stmt during VN we are making sure to
register the result for the original stmt into the hashtable so
VN iteration has the chance to converge and we avoid inserting
another copy each time. But the implementation doesn't work for
non-SSA name values, and is also not necessary for constants since
we did not insert anything for them. The following appropriately
guards the calls to vn_nary_op_insert_stmt as was already done
in one place.
PR tree-optimization/121514
* tree-ssa-sccvn.cc (visit_nary_op): Only call
vn_nary_op_insert_stmt for SSA name result.
* gcc.dg/torture/pr121514.c: New testcase.
Diffstat (limited to 'gcc/testsuite/gm2/iso/run/pass/constbool4.mod')
0 files changed, 0 insertions, 0 deletions