diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-vect-loop.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0ca3e15..ffc2d26 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2019-12-10 Richard Sandiford <richard.sandiford@arm.com> + * tree-vect-loop.c (vect_create_epilog_for_reduction): When + handling direct_slp_reduc, allow the PHI arguments to have + a different type from the vector elements. + +2019-12-10 Richard Sandiford <richard.sandiford@arm.com> + * tree-vect-stmts.c (vectorizable_condition): Record the loop masks required for extract-last reductions. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 50f1a22..353a5ff 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -5054,6 +5054,8 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, tree scalar_value = PHI_ARG_DEF_FROM_EDGE (orig_phis[i]->stmt, loop_preheader_edge (loop)); + scalar_value = gimple_convert (&seq, TREE_TYPE (vectype), + scalar_value); vector_identity = gimple_build_vector_from_val (&seq, vectype, scalar_value); } |