On 09/06/2016 12:51 PM, Bin Cheng wrote:
Hi,
This patch checks if loop has enough niters for peeling for data access gaps in 
vect_analyze_loop_2, while now this check is in vect_transform_loop stage.  The 
problem is vectorizer may vectorize loops without enough iterations and 
generate false guard on the vectorized loop.  Though the loop is successfully 
vectorized, it will never be executed, and most likely, it will be removed 
during cfg-cleanup.  Examples can be found in revised tests of this patch.

Thanks,
bin

2016-09-01  Bin Cheng  <bin.ch...@arm.com>

        * tree-vect-loop.c (vect_analyze_loop_2): Check and skip loop if it
        has no enough iterations for LOOP_VINFO_PEELING_FOR_GAPS.

gcc/testsuite/ChangeLog
2016-09-01  Bin Cheng  <bin.ch...@arm.com>

        * gcc.dg/vect/vect-98.c: Refine test case.
        * gcc.dg/vect/vect-strided-a-u8-i8-gap2.c: Ditto.
        * gcc.dg/vect/vect-strided-u8-i8-gap2.c: Ditto.
        * gcc.dg/vect/vect-strided-u8-i8-gap4.c: Ditto.

OK.
jeff

Reply via email to