aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-02-24 08:27:25 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-02-24 08:27:25 +0000
commit47d3fdb242c7374a6fe3e4b0981a70767bc585a2 (patch)
treee0dba67a080ec0f33dc1d5e7f9f7ead474c6fe8f /gcc/tree-vect-stmts.c
parentdab73e731721556b70d7c71d8253e089aa2dd303 (diff)
downloadgcc-47d3fdb242c7374a6fe3e4b0981a70767bc585a2.zip
gcc-47d3fdb242c7374a6fe3e4b0981a70767bc585a2.tar.gz
gcc-47d3fdb242c7374a6fe3e4b0981a70767bc585a2.tar.bz2
re PR tree-optimization/69907 (wrong code at -O3 on x86_64-linux-gnu)
2016-02-24 Richard Biener <rguenther@suse.de> PR tree-optimization/69907 * tree-vect-stmts.c (vectorizable_load): Check for gaps at the end of permutations for BB vectorization. * gcc.dg/vect/bb-slp-pr69907.c: New testcase. * gcc.dg/vect/bb-slp-34.c: XFAIL. * gcc.dg/vect/bb-slp-pr68892.c: Likewise. From-SVN: r233655
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 1aade9e..9678d7c 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -6395,6 +6395,19 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
slp_perm = true;
group_size = GROUP_SIZE (vinfo_for_stmt (first_stmt));
+
+ /* ??? The following is overly pessimistic (as well as the loop
+ case above) in the case we can statically determine the excess
+ elements loaded are within the bounds of a decl that is accessed.
+ Likewise for BB vectorizations using masked loads is a possibility. */
+ if (bb_vinfo && slp_perm && group_size % nunits != 0)
+ {
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "BB vectorization with gaps at the end of a load "
+ "is not supported\n");
+ return false;
+ }
+
if (!slp
&& !PURE_SLP_STMT (stmt_info)
&& !STMT_VINFO_STRIDED_P (stmt_info))