[PATCH 01/2]Maintain irreducible region information in vectorizer peeling

Bin Cheng Bin.Cheng@arm.com
Tue Mar 28 12:01:00 GMT 2017

This patch fixes a latent bug in vectorizer, specifically, vect_do_peeling doesn't mark newly created edge
with irreducible flag if the vectorized loop is in irreducible region.  Function checking_verify_loop_structure
needs to be explicitly called in vectorizer otherwise the issue is covered, but I am okay if we should avoid
this call.
Bootstrap and test on x86_64 and AArch64.  This patch causes new failure in gcc.dg/tree-ssa/pr71077.c,
which uncovers another latent bug in vectorizer.  That will be fixed by next patch.  Is this OK?

2017-03-27  Bin Cheng  <bin.cheng@arm.com>

	* tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
	mark new edge's irreducible flag accordign to it.
	(vect_do_peeling): Check loop preheader edge's irreducible flag
	and pass it to function slpeel_add_loop_guard.
	* tree-vectorizer.c (vectorize_loops): Explicitly call function

2017-03-27  Bin Cheng  <bin.cheng@arm.com>

	* gcc.c-torture/compile/irreducible-loop.c: New.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: irreducible-loop-20170327.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170328/dc69c540/attachment.txt>

More information about the Gcc-patches mailing list