]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/118717 - store commoning vs. abnormals
authorRichard Biener <rguenther@suse.de>
Mon, 3 Feb 2025 08:55:50 +0000 (09:55 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 3 Feb 2025 10:23:22 +0000 (11:23 +0100)
commitfbcbbfe2bf83eb8b1347144eeca37b06be5a8bb5
tree08b78236ed838b6e8c379f2b382edb30b198bb81
parent75ab30f77f6d8a555aa78472b45a75a508544c68
tree-optimization/118717 - store commoning vs. abnormals

When we sink common stores in cselim or the sink pass we have to
make sure to not introduce overlapping lifetimes for abnormals
used in the ref.  The easiest is to avoid sinking stmts which
reference abnormals at all which is what the following does.

PR tree-optimization/118717
* tree-ssa-phiopt.cc (cond_if_else_store_replacement_1):
Do not common stores referencing abnormal SSA names.
* tree-ssa-sink.cc (sink_common_stores_to_bb): Likewise.

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