]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116879 - failure to recognize non-empty latch
authorRichard Biener <rguenther@suse.de>
Mon, 30 Sep 2024 11:38:28 +0000 (13:38 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 30 Sep 2024 14:19:43 +0000 (16:19 +0200)
commit18e905b461a7138185cf4f0efde4a4e1214fb798
tree69fb83ff417389abe4ebe2c1a18c8adb61bc001e
parent87905f63a6521eef1f38082e2368e18c637ef092
tree-optimization/116879 - failure to recognize non-empty latch

When we relaxed the vectorizers constraint on loop structure verifying
the emptiness of the latch became too lose as can be seen in the case
for PR116879 where the latch effectively contains two basic-blocks
which one being an unmerged forwarder that's not empty.

PR tree-optimization/116879
* tree-vect-loop.cc (vect_analyze_loop_form): Scan all
blocks that form the latch.

* gcc.dg/pr116879.c: New testcase.
gcc/testsuite/gcc.dg/pr116879.c [new file with mode: 0644]
gcc/tree-vect-loop.cc