diff options
author | Ira Rosen <irar@il.ibm.com> | 2009-05-11 12:33:13 +0000 |
---|---|---|
committer | Ira Rosen <irar@gcc.gnu.org> | 2009-05-11 12:33:13 +0000 |
commit | 4da39468e78f9bbc7abb34db5a71b3c8183e848a (patch) | |
tree | 8e88e1d02b9765f0c7c8d49664f5a03d1d46f536 /gcc/tree-vect-data-refs.c | |
parent | 4effdf02d48fae0d7487a558125563ec12d7b586 (diff) | |
download | gcc-4da39468e78f9bbc7abb34db5a71b3c8183e848a.zip gcc-4da39468e78f9bbc7abb34db5a71b3c8183e848a.tar.gz gcc-4da39468e78f9bbc7abb34db5a71b3c8183e848a.tar.bz2 |
re PR tree-optimization/40074 (ICE in vect_get_vec_def_for_operand, at tree-vect-stmts.c:944)
PR tree-optimization/40074
* tree-vect-data-refs.c (vect_analyze_group_access): Take gaps into
account in group size and step comparison.
From-SVN: r147372
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index a117898..42854a0 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -1424,7 +1424,7 @@ vect_analyze_group_access (struct data_reference *dr) /* First stmt in the interleaving chain. Check the chain. */ gimple next = DR_GROUP_NEXT_DR (vinfo_for_stmt (stmt)); struct data_reference *data_ref = dr; - unsigned int count = 1; + unsigned int count = 1, gaps = 0; tree next_step; tree prev_init = DR_INIT (data_ref); gimple prev = stmt; @@ -1490,6 +1490,8 @@ vect_analyze_group_access (struct data_reference *dr) fprintf (vect_dump, "interleaved store with gaps"); return false; } + + gaps += diff - 1; } /* Store the gap from the previous member of the group. If there is no @@ -1506,8 +1508,9 @@ vect_analyze_group_access (struct data_reference *dr) the type to get COUNT_IN_BYTES. */ count_in_bytes = type_size * count; - /* Check that the size of the interleaving is not greater than STEP. */ - if (dr_step < count_in_bytes) + /* Check that the size of the interleaving (including gaps) is not greater + than STEP. */ + if (dr_step && dr_step < count_in_bytes + gaps * type_size) { if (vect_print_dump_info (REPORT_DETAILS)) { |