On 09/06/2016 12:54 PM, Bin Cheng wrote:
Hi,
LOOP_VINFO_NITERS is computed as LOOP_VINFO_NITERSM1 + 1, which could overflow
in loop niters' type. Vectorizer needs to generate more code computing
vectorized niters if overflow does happen. However, For common loops, there is
no overflow actually, this patch tries to prove the no-overflow information and
use that to improve code generation. At the moment, no-overflow information
comes either from loop niter analysis, or the truth that we know loop is peeled
for non-zero iterations in prologue peeling. For the latter case, it doesn't
matter if the original LOOP_VINFO_NITERS overflows or not, because computation
LOOP_VINFO_NITERS - LOOP_VINFO_PEELING_FOR_ALIGNMENT cancels the overflow by
underflow.
Thanks,
bin
2016-09-01 Bin Cheng <bin.ch...@arm.com>
* tree-vect-loop.c (loop_niters_no_overflow): New func.
(vect_transform_loop): Call loop_niters_no_overflow. Pass the
no-overflow information to vect_do_peeling_for_loop_bound and
vect_gen_vector_loop_niters.
OK when prereqs are all approved.
jeff