diff options
author | Richard Biener <rguenther@suse.de> | 2016-04-15 07:28:44 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-04-15 07:28:44 +0000 |
commit | 0ab34b9e5a7dd2c56733c316859cb528ba3cfb84 (patch) | |
tree | 5abe4f214c09354e4ba722b97daf7dc9a5bff84f /gcc/tree-vect-data-refs.c | |
parent | 8e718ecbb0ded9686113e64c9241c083b7afc620 (diff) | |
download | gcc-0ab34b9e5a7dd2c56733c316859cb528ba3cfb84.zip gcc-0ab34b9e5a7dd2c56733c316859cb528ba3cfb84.tar.gz gcc-0ab34b9e5a7dd2c56733c316859cb528ba3cfb84.tar.bz2 |
re PR tree-optimization/70130 (h264ref fails with verification error starting with r231674 (r224221 is the true start of the problem))
2016-04-15 Richard Biener <rguenther@suse.de>
Alan Modra <amodra@gmail.com>
PR tree-optimization/70130
* tree-vect-data-refs.c (vect_supportable_dr_alignment): Detect
when alignment stays not the same and no not use the realign
scheme then.
* gcc.dg/vect/O3-pr70130.c: New testcase.
Co-Authored-By: Alan Modra <amodra@gmail.com>
From-SVN: r235006
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index f8695b1..7652e21 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -5983,10 +5983,19 @@ vect_supportable_dr_alignment (struct data_reference *dr, || targetm.vectorize.builtin_mask_for_load ())) { tree vectype = STMT_VINFO_VECTYPE (stmt_info); - if ((nested_in_vect_loop - && (TREE_INT_CST_LOW (DR_STEP (dr)) - != GET_MODE_SIZE (TYPE_MODE (vectype)))) - || !loop_vinfo) + + /* If we are doing SLP then the accesses need not have the + same alignment, instead it depends on the SLP group size. */ + if (loop_vinfo + && STMT_SLP_TYPE (stmt_info) + && (LOOP_VINFO_VECT_FACTOR (loop_vinfo) + * GROUP_SIZE (vinfo_for_stmt (GROUP_FIRST_ELEMENT (stmt_info))) + % TYPE_VECTOR_SUBPARTS (vectype) != 0)) + ; + else if (!loop_vinfo + || (nested_in_vect_loop + && (TREE_INT_CST_LOW (DR_STEP (dr)) + != GET_MODE_SIZE (TYPE_MODE (vectype))))) return dr_explicit_realign; else return dr_explicit_realign_optimized; |