From 4fb8ba9d357297206678a3e3eacf9292148eafb5 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 6 Jul 2016 08:14:41 +0000 Subject: [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 --- gcc/tree-vectorizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-vectorizer.h') diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 180b306..0806630 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1065,7 +1065,7 @@ extern tree bump_vector_ptr (tree, gimple *, gimple_stmt_iterator *, gimple *, extern tree vect_create_destination_var (tree, tree); extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT); extern bool vect_store_lanes_supported (tree, unsigned HOST_WIDE_INT); -extern bool vect_grouped_load_supported (tree, unsigned HOST_WIDE_INT); +extern bool vect_grouped_load_supported (tree, bool, unsigned HOST_WIDE_INT); extern bool vect_load_lanes_supported (tree, unsigned HOST_WIDE_INT); extern void vect_permute_store_chain (vec ,unsigned int, gimple *, gimple_stmt_iterator *, vec *); -- cgit v1.1