]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/111917 - bougs IL after guard hoisting
authorRichard Biener <rguenther@suse.de>
Mon, 23 Oct 2023 09:25:17 +0000 (11:25 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 15 Dec 2023 12:17:33 +0000 (13:17 +0100)
commitec8d0c33211c5e92c220483d6fe9f0a2391d2d6d
tree551a48662df989b18c1d0bbbf215f9bf0c118cef
parent03b5888abc9fe9a81df77125a8d4975ab8695c8c
tree-optimization/111917 - bougs IL after guard hoisting

The unswitching code to hoist guards inserts conditions in wrong
places.  The following fixes this, simplifying code.

PR tree-optimization/111917
* tree-ssa-loop-unswitch.c (hoist_guard): Always insert
new conditional after last stmt.

* gcc.dg/torture/pr111917.c: New testcase.

(cherry picked from commit d96bd4aade170fcd86f5f09b68b770dde798e631)
gcc/testsuite/gcc.dg/torture/pr111917.c [new file with mode: 0644]
gcc/tree-ssa-loop-unswitch.c
This page took 0.072727 seconds and 6 git commands to generate.