]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116079 - store motion and clobbers
authorRichard Biener <rguenther@suse.de>
Thu, 25 Jul 2024 06:58:42 +0000 (08:58 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 25 Jul 2024 10:44:57 +0000 (12:44 +0200)
commit3bf05516d9ffea2a39939b656f0e51052000653e
tree810f6b709518b9445fe18de5a39cdac9aba50a87
parentcfd3f06b4c65e15d4f6af8bd4862b835efd61a72
tree-optimization/116079 - store motion and clobbers

When we move a store out of an inner loop and remove a clobber in
the process, analysis of the inner loop can run into the clobber
via the meta-data and crash when accessing its basic-block.  The
following avoids this by clearing the VDEF which is how it identifies
already processed stores.

PR tree-optimization/116079
* tree-ssa-loop-im.cc (hoist_memory_references): Clear
VDEF of elided clobbers.

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