The direct_slp_reduc code in vect_create_epilog_for_reduction was
still assuming that all types involved in a reduction are the same
(up to types_compatible_p), whereas we now support differences in
sign. This was causing an ICE in gcc.dg/vect/pr92324-4.c for SVE.
2019-12-10 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* 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.
From-SVN: r279164
+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
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);
}