From 47d3fdb242c7374a6fe3e4b0981a70767bc585a2 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 24 Feb 2016 08:27:25 +0000 Subject: re PR tree-optimization/69907 (wrong code at -O3 on x86_64-linux-gnu) 2016-02-24 Richard Biener 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 --- gcc/tree-vect-stmts.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc/tree-vect-stmts.c') 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)) -- cgit v1.1