aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-11-06 14:03:08 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-11-06 14:03:08 +0000
commit4b205bf82d06c4d9d0ae7b78e54c712d79d5b021 (patch)
tree2d4311cdbc02bb49fa26ddb681528e5306796259 /gcc
parent4653da0b6ec2a5c272d9cd98a970f0037f1a5789 (diff)
downloadgcc-4b205bf82d06c4d9d0ae7b78e54c712d79d5b021.zip
gcc-4b205bf82d06c4d9d0ae7b78e54c712d79d5b021.tar.gz
gcc-4b205bf82d06c4d9d0ae7b78e54c712d79d5b021.tar.bz2
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 <richard.sandiford@arm.com> 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-vect-loop.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1ff3d4b..daf1194 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-06 Richard Sandiford <richard.sandiford@arm.com>
+
+ * 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 <claziss@synopsys.com>
* config/arc/arc.c (arc_split_ior): Add asserts.
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index d982e1a..788cc87 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 ());