aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index c409dc7..cab2f2f 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -118,6 +118,11 @@ vect_get_smallest_scalar_type (gimple *stmt, HOST_WIDE_INT *lhs_size_unit,
tree scalar_type = gimple_expr_type (stmt);
HOST_WIDE_INT lhs, rhs;
+ /* During the analysis phase, this function is called on arbitrary
+ statements that might not have scalar results. */
+ if (!tree_fits_uhwi_p (TYPE_SIZE_UNIT (scalar_type)))
+ return scalar_type;
+
lhs = rhs = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (scalar_type));
if (is_gimple_assign (stmt)