diff options
author | Richard Biener <rguenther@suse.de> | 2024-11-11 09:40:20 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-11-11 13:03:16 +0100 |
commit | da64698159fe69b68f5264b54cebcb67c501b3cf (patch) | |
tree | 90c97c81ecc5eefb0adf760946a9b84f3dd22d96 /gcc/function.cc | |
parent | 95960cd473297cd0d2c9e75a1a424b870cee32f5 (diff) | |
download | gcc-da64698159fe69b68f5264b54cebcb67c501b3cf.zip gcc-da64698159fe69b68f5264b54cebcb67c501b3cf.tar.gz gcc-da64698159fe69b68f5264b54cebcb67c501b3cf.tar.bz2 |
tree-optimization/117510 - fix guard hoisting validity check
For the loop in the testcase we currently fail to hoist the guard
check of the inner loop (m > 0) out of the outer loop because
find_loop_guard checks all blocks of the outer loop for side-effects,
including those that are skipped by the guard. This usually
is harmless as the guard does not skip any blocks in the outer loop
but in this case store-motion was applied to the inner loop and thus
there's now a skipped store in the outer loop.
The following properly skips blocks that are dominated by the
entry to the skipped region.
PR tree-optimization/117510
* tree-ssa-loop-unswitch.cc (find_loop_guard): Only check
not skipped blocks for side-effects.
* gcc.dg/vect/vect-outer-pr117510.c: New testcase.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions