[PATCH GCC 4/9]Check niters for peeling for data access gaps in analyzer

Jeff Law law@redhat.com
Wed Sep 7 12:23:00 GMT 2016


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.cheng@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.cheng@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



More information about the Gcc-patches mailing list