aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-11-25 08:46:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-11-25 08:46:34 +0000
commit993a6bd98b1e9a31f453f3ac7a21550d94b5b601 (patch)
tree03ddf2d2a8957559f8fbc29c53b7142f47328945 /gcc/tree-vect-data-refs.c
parentb1b49824a8037a79e6a819bdd072820038f77586 (diff)
downloadgcc-993a6bd98b1e9a31f453f3ac7a21550d94b5b601.zip
gcc-993a6bd98b1e9a31f453f3ac7a21550d94b5b601.tar.gz
gcc-993a6bd98b1e9a31f453f3ac7a21550d94b5b601.tar.bz2
re PR tree-optimization/68502 ([i686] spec2000/179.art runfails after r222914)
2015-11-25 Richard Biener <rguenther@suse.de> PR tree-optimization/68502 * tree-vect-data-refs.c (vect_analyze_group_access_1): Restore check that the step is a multiple of the type size. * gcc.dg/vect/pr68502-1.c: New testcase. * gcc.dg/vect/pr68502-2.c: Likewise. From-SVN: r230854
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index f4436b5..d788b59 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -2176,6 +2176,27 @@ vect_analyze_group_access_1 (struct data_reference *dr)
if (tree_fits_shwi_p (step))
{
dr_step = tree_to_shwi (step);
+ /* Check that STEP is a multiple of type size. Otherwise there is
+ a non-element-sized gap at the end of the group which we
+ cannot represent in GROUP_GAP or GROUP_SIZE.
+ ??? As we can handle non-constant step fine here we should
+ simply remove uses of GROUP_GAP between the last and first
+ element and instead rely on DR_STEP. GROUP_SIZE then would
+ simply not include that gap. */
+ if ((dr_step % type_size) != 0)
+ {
+ if (dump_enabled_p ())
+ {
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "Step ");
+ dump_generic_expr (MSG_NOTE, TDF_SLIM, step);
+ dump_printf (MSG_NOTE,
+ " is not a multiple of the element size for ");
+ dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr));
+ dump_printf (MSG_NOTE, "\n");
+ }
+ return false;
+ }
groupsize = absu_hwi (dr_step) / type_size;
}
else