From 512854fe89a2b18e6c9a474a7dc69679a70b93da Mon Sep 17 00:00:00 2001 From: Alan Hayward Date: Mon, 26 Oct 2015 11:55:45 +0000 Subject: [PATCH] tree-vect-loop.c (vect_create_epilog_for_reduction): Fix VEC_COND_EXPR types. 2015-10-26 Alan Hayward * tree-vect-loop.c (vect_create_epilog_for_reduction): Fix VEC_COND_EXPR types. From-SVN: r229346 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-loop.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 69d2ccbf6f0..2438005dec9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-26 Alan Hayward + + * tree-vect-loop.c (vect_create_epilog_for_reduction): Fix + VEC_COND_EXPR types. + 2015-10-26 Kyrylo Tkachov * auto-inc-dec.c (insert_move_insn_before): Delete. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 0ce774d401d..cc51597ce96 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -4290,8 +4290,9 @@ vect_create_epilog_for_reduction (vec vect_defs, gimple *stmt, /* Get various versions of the type of the vector of indexes. */ tree index_vec_type = TREE_TYPE (induction_index); gcc_checking_assert (TYPE_UNSIGNED (index_vec_type)); - tree index_vec_type_signed = signed_type_for (index_vec_type); tree index_scalar_type = TREE_TYPE (index_vec_type); + tree index_vec_cmp_type = build_same_sized_truth_vector_type + (index_vec_type); /* Get an unsigned integer version of the type of the data vector. */ int scalar_precision = GET_MODE_PRECISION (TYPE_MODE (scalar_type)); @@ -4336,7 +4337,7 @@ vect_create_epilog_for_reduction (vec vect_defs, gimple *stmt, /* Compare the max index vector to the vector of found indexes to find the position of the max value. */ - tree vec_compare = make_ssa_name (index_vec_type_signed); + tree vec_compare = make_ssa_name (index_vec_cmp_type); gimple *vec_compare_stmt = gimple_build_assign (vec_compare, EQ_EXPR, induction_index, max_index_vec); -- 2.30.2