Skip to content
Snippets Groups Projects
Commit f1c6789a authored by Tamar Christina's avatar Tamar Christina Committed by Tamar Christina
Browse files

vect: Fix dominators when adding a guard to skip the vector loop [PR118211]


The alignment peeling changes exposed a latent missing dominator update
with early break vectorization, specifically when inserting the vector
skip edge, since the new edge bypasses the prolog skip block and thus
has the potential to subvert its dominance.  This patch fixes that.

gcc/ChangeLog:

	PR tree-optimization/118211
	PR tree-optimization/116126
	* tree-vect-loop-manip.cc (vect_do_peeling): Update immediate
	dominators of nodes that were dominated by the prolog skip block
	after inserting vector skip edge.  Initialize prolog variable to
	NULL to avoid bogus -Wmaybe-uninitialized during bootstrap.

gcc/testsuite/ChangeLog:

	PR tree-optimization/118211
	PR tree-optimization/116126
	* g++.dg/vect/vect-early-break_6.cc: New test.

Co-Authored-By: default avatarAlex Coplan <alex.coplan@arm.com>
parent 0a462451
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment