]> 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)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Jul 2024 17:05:56 +0000 (19:05 +0200)
commit89dc14d6339ddb95400271f844f19387bb103474
treef35e636f186228e1f1bf2cbdad3d117babd83201
parentab3b0560320b1124a69cf19737fc8ba5861fc281
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