From: Richard Sandiford Date: Wed, 6 Nov 2019 14:03:08 +0000 (+0000) Subject: Don't vectorise single-iteration epilogues X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b205bf82d06c4d9d0ae7b78e54c712d79d5b021;p=gcc.git Don't vectorise single-iteration epilogues With a later patch I saw a case in which we peeled a single iteration for gaps but didn't need to peel further iterations to make up a full vector. We then tried to vectorise the single-iteration epilogue. 2019-11-06 Richard Sandiford gcc/ * tree-vect-loop.c (vect_analyze_loop): Only try to vectorize the epilogue if there are peeled iterations for it to handle. From-SVN: r277886 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ff3d4b9088..daf1194fe8b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-06 Richard Sandiford + + * tree-vect-loop.c (vect_analyze_loop): Only try to vectorize + the epilogue if there are peeled iterations for it to handle. + 2019-11-06 Claudiu Zissulescu * config/arc/arc.c (arc_split_ior): Add asserts. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index d982e1aea77..788cc8786ae 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2459,6 +2459,7 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared) vect_epilogues = (!loop->simdlen && loop->inner == NULL && PARAM_VALUE (PARAM_VECT_EPILOGUES_NOMASK) + && LOOP_VINFO_PEELING_FOR_NITER (first_loop_vinfo) /* For now only allow one epilogue loop. */ && first_loop_vinfo->epilogue_vinfos.is_empty ());