summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-09-26 16:54:51 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-09-26 16:54:51 +0000
commit0bfc204142439b8167bf3447d7d12b65d1da82f8 (patch)
treea2335246e4ea0ed0bd0ecd9fb508bcd581749c5f /gcc/expr.c
parent1b4dbccc1f828fa00e6acc8b88d24301c65552df (diff)
re PR tree-optimization/91896 (ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1687)
2019-09-25 Richard Biener <rguenther@suse.de> PR tree-optimization/91896 * tree-vect-loop.c (vectorizable_reduction): The single def-use cycle optimization cannot apply when there's more than one pattern stmt involved. * gcc.dg/torture/pr91896.c: New testcase. From-SVN: r276158
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 2f2b53f8b69..7a7070670ed 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7230,12 +7230,13 @@ get_inner_reference (tree exp, poly_int64_pod *pbitsize,
*punsignedp = (! INTEGRAL_TYPE_P (TREE_TYPE (exp))
|| TYPE_UNSIGNED (TREE_TYPE (exp)));
- /* For vector types, with the correct size of access, use the mode of
- inner type. */
- if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == VECTOR_TYPE
- && TREE_TYPE (exp) == TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0)))
- && tree_int_cst_equal (size_tree, TYPE_SIZE (TREE_TYPE (exp))))
- mode = TYPE_MODE (TREE_TYPE (exp));
+ /* For vector element types with the correct size of access or for
+ vector typed accesses use the mode of the access type. */
+ if ((TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == VECTOR_TYPE
+ && TREE_TYPE (exp) == TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0)))
+ && tree_int_cst_equal (size_tree, TYPE_SIZE (TREE_TYPE (exp))))
+ || VECTOR_TYPE_P (TREE_TYPE (exp)))
+ mode = TYPE_MODE (TREE_TYPE (exp));
}
else
{