aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.h
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-05-11 12:03:10 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-05-11 12:03:10 +0000
commit319e6439f592285e7d931c47285c363cca113788 (patch)
treec7417b74792b46bcd03c94c197dcf0d6da80c8c3 /gcc/tree-data-ref.h
parent76a02e42c00f4e2d79087c77f0c7970d24f4c3c0 (diff)
downloadgcc-319e6439f592285e7d931c47285c363cca113788.zip
gcc-319e6439f592285e7d931c47285c363cca113788.tar.gz
gcc-319e6439f592285e7d931c47285c363cca113788.tar.bz2
re PR tree-optimization/53295 (Vectorizer support for non-constant strided loads depends on gather support overwriting the data-ref with bogus data)
2012-05-11 Richard Guenther <rguenther@suse.de> PR tree-optimization/53295 * tree-data-ref.h (stride_of_unit_type_p): Handle non-constant strides. * tree-data-ref.c (dr_analyze_innermost): Allow non-constant strides when analyzing data-references in a loop context. * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Reject non-constant strides for now. (vect_enhance_data_refs_alignment): Ignore data references that are strided loads. (vect_analyze_data_ref_access): Handle non-constant strides. (vect_check_strided_load): Verify the data-reference is a load. (vect_analyze_data_refs): Restructure to make strided load support not dependent on gather support. * tree-vect-stmts.c (vectorizable_load): Avoid useless work when doing strided or gather loads. * tree-vect-loop-manip.c (vect_vfa_segment_size): Use integer_zerop to compare stride with zero. From-SVN: r187402
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r--gcc/tree-data-ref.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h
index 41a20d7..efce845 100644
--- a/gcc/tree-data-ref.h
+++ b/gcc/tree-data-ref.h
@@ -618,9 +618,10 @@ bool stmt_with_adjacent_zero_store_dr_p (gimple);
static inline bool
stride_of_unit_type_p (tree stride, tree type)
{
- return tree_int_cst_equal (fold_unary (ABS_EXPR, TREE_TYPE (stride),
- stride),
- TYPE_SIZE_UNIT (type));
+ return (TREE_CODE (stride) == INTEGER_CST
+ && tree_int_cst_equal (fold_unary (ABS_EXPR, TREE_TYPE (stride),
+ stride),
+ TYPE_SIZE_UNIT (type)));
}
/* Determines whether RDG vertices V1 and V2 access to similar memory