]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-vect-loop.c (vect_create_epilog_for_reduction): Fix VEC_COND_EXPR types.
authorAlan Hayward <alan.hayward@arm.com>
Mon, 26 Oct 2015 11:55:45 +0000 (11:55 +0000)
committerAlan Hayward <alahay01@gcc.gnu.org>
Mon, 26 Oct 2015 11:55:45 +0000 (11:55 +0000)
2015-10-26  Alan Hayward <alan.hayward@arm.com>

* tree-vect-loop.c (vect_create_epilog_for_reduction): Fix
VEC_COND_EXPR types.

From-SVN: r229346

gcc/ChangeLog
gcc/tree-vect-loop.c

index 69d2ccbf6f0112dffc326999b2fb2362fd3e0098..2438005dec925fb9123ab9c4ad5337462ea7c3a4 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-26  Alan Hayward <alan.hayward@arm.com>
+
+       * tree-vect-loop.c (vect_create_epilog_for_reduction): Fix
+       VEC_COND_EXPR types.
+
 2015-10-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * auto-inc-dec.c (insert_move_insn_before): Delete.
index 0ce774d401d07c3f78c1fe7d80c9fe76c3bc6f46..cc51597ce9695fb47f2fd635d22be5258d51d29b 100644 (file)
@@ -4290,8 +4290,9 @@ vect_create_epilog_for_reduction (vec<tree> 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<tree> 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);