aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2016-07-06 08:14:41 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2016-07-06 08:14:41 +0000
commit4fb8ba9d357297206678a3e3eacf9292148eafb5 (patch)
treebec6504ded7b6f968d307ecd48cfc8553e087464 /gcc/tree-vect-loop.c
parent134c85caeba541ff4fb4377fb12729073cbdfe41 (diff)
downloadgcc-4fb8ba9d357297206678a3e3eacf9292148eafb5.zip
gcc-4fb8ba9d357297206678a3e3eacf9292148eafb5.tar.gz
gcc-4fb8ba9d357297206678a3e3eacf9292148eafb5.tar.bz2
[5/7] Move the fix for PR65518
This patch moves the fix for PR65518 to the code that checks whether load-and-permute operations are supported. If the group size is greater than the vectorisation factor, it would still be possible to fall back to elementwise loads (as for strided groups) rather than fail vectorisation entirely. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vectorizer.h (vect_grouped_load_supported): Add a single_element_p parameter. * tree-vect-data-refs.c (vect_grouped_load_supported): Likewise. Check the PR65518 case here rather than in vectorizable_load. * tree-vect-loop.c (vect_analyze_loop_2): Update call accordignly. * tree-vect-stmts.c (vectorizable_load): Likewise. From-SVN: r238037
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 5e40076..63c002e 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2152,10 +2152,12 @@ again:
{
vinfo = vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (node)[0]);
vinfo = vinfo_for_stmt (STMT_VINFO_GROUP_FIRST_ELEMENT (vinfo));
+ bool single_element_p = !STMT_VINFO_GROUP_NEXT_ELEMENT (vinfo);
size = STMT_VINFO_GROUP_SIZE (vinfo);
vectype = STMT_VINFO_VECTYPE (vinfo);
if (! vect_load_lanes_supported (vectype, size)
- && ! vect_grouped_load_supported (vectype, size))
+ && ! vect_grouped_load_supported (vectype, single_element_p,
+ size))
return false;
}
}