]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/114832 - wrong dominator info with vect peeling
authorRichard Biener <rguenther@suse.de>
Wed, 24 Apr 2024 04:24:22 +0000 (06:24 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 24 Apr 2024 08:11:00 +0000 (10:11 +0200)
commite28e8ab1a92e9b49f7c4045377577c8dc17751b7
tree2239cbdc97c12fb2bd6a49e8459af06b52008668
parentd279c9d89b2f6ce89c1eec0ff4b980e9c5f51fd1
tree-optimization/114832 - wrong dominator info with vect peeling

When we update the dominator of the redirected exit after peeling
we check whether the immediate dominator was the loop header rather
than the exit source when we later want to just update it to the
new source.  The following fixes this oversight.

PR tree-optimization/114832
* tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
Fix dominance check.

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