diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-16 09:28:26 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-16 09:28:26 +0000 |
commit | 82279a515eae2b655eaba39e42e7dded25da5e2c (patch) | |
tree | 1cefcc28303d503484179c158c5c32f77a936a1b /gcc/tree-vect-data-refs.c | |
parent | 9064759767c96c221038fc5998596d425a18622d (diff) | |
download | gcc-82279a515eae2b655eaba39e42e7dded25da5e2c.zip gcc-82279a515eae2b655eaba39e42e7dded25da5e2c.tar.gz gcc-82279a515eae2b655eaba39e42e7dded25da5e2c.tar.bz2 |
Don't group gather loads (PR83847)
In the testcase we were trying to group two gather loads, even though
that isn't supported. Fixed by explicitly disallowing grouping of
gathers and scatters.
This problem didn't show up on SVE because there we convert to
IFN_GATHER_LOAD/IFN_SCATTER_STORE pattern statements, which fail
the can_group_stmts_p check.
2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
gcc/testsuite/
* gcc.dg/torture/pr83847.c: New test.
From-SVN: r256730
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 684b7c5..01f7138 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2923,7 +2923,8 @@ vect_analyze_data_ref_accesses (vec_info *vinfo) data_reference_p dra = datarefs_copy[i]; stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra)); stmt_vec_info lastinfo = NULL; - if (! STMT_VINFO_VECTORIZABLE (stmtinfo_a)) + if (!STMT_VINFO_VECTORIZABLE (stmtinfo_a) + || STMT_VINFO_GATHER_SCATTER_P (stmtinfo_a)) { ++i; continue; @@ -2932,7 +2933,8 @@ vect_analyze_data_ref_accesses (vec_info *vinfo) { data_reference_p drb = datarefs_copy[i]; stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb)); - if (! STMT_VINFO_VECTORIZABLE (stmtinfo_b)) + if (!STMT_VINFO_VECTORIZABLE (stmtinfo_b) + || STMT_VINFO_GATHER_SCATTER_P (stmtinfo_b)) break; /* ??? Imperfect sorting (non-compatible types, non-modulo |