From 3ec43c5e312e368cca5cf0b9727bcbd71f13a704 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 23 Oct 2017 09:40:51 +0000 Subject: [PATCH] Use SCALAR_TYPE_MODE in vect_create_epilog_for_reduction This follows on from similar changes a couple of months ago and is needed when general modes have variable size. 2017-10-23 Richard Sandiford gcc/ * tree-vect-loop.c (vect_create_epilog_for_reduction): Use SCALAR_TYPE_MODE instead of TYPE_MODE. From-SVN: r254002 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-loop.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d53514ddcca..3fc03ad08cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-23 Richard Sandiford + + * tree-vect-loop.c (vect_create_epilog_for_reduction): Use + SCALAR_TYPE_MODE instead of TYPE_MODE. + 2017-10-23 Richard Sandiford Alan Hayward David Sherwood diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 7fb09c46628..3b1f95fca8b 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -4487,7 +4487,7 @@ vect_create_epilog_for_reduction (vec vect_defs, gimple *stmt, gcc_assert (gimple_assign_rhs_code (vec_stmt) == VEC_COND_EXPR); int scalar_precision - = GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (vectype))); + = GET_MODE_PRECISION (SCALAR_TYPE_MODE (TREE_TYPE (vectype))); tree cr_index_scalar_type = make_unsigned_type (scalar_precision); tree cr_index_vector_type = build_vector_type (cr_index_scalar_type, TYPE_VECTOR_SUBPARTS (vectype)); -- 2.30.2