Commit ca49c831 by Richard Sandiford Committed by Richard Sandiford

Disallow EXTRACT_LAST_REDUCTION for reduction chains

gcc.dg/vect/vect-cond-reduc-5.c was ICEing for SVE because we
tried to use an extract-last reduction for a chain of COND_EXPRs.
Adding support for the chained case would be too invasive for stage 3
so this patch explicitly forbids it instead.  I've filed PR92884 for
the possible future work.

2019-12-10  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-loop.c (vectorizable_reduction): Don't use
	EXTRACT_LAST_REDUCTION for chained reductions.

From-SVN: r279161
parent 9995ce07
2019-12-10 Richard Sandiford <richard.sandiford@arm.com> 2019-12-10 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vectorizable_reduction): Don't use
EXTRACT_LAST_REDUCTION for chained reductions.
2019-12-10 Richard Sandiford <richard.sandiford@arm.com>
* ipa-utils.h (get_odr_name_for_type): Check for a TYPE_DECL. * ipa-utils.h (get_odr_name_for_type): Check for a TYPE_DECL.
* ipa-devirt.c (warn_types_mismatch): Don't call xstrdup for the * ipa-devirt.c (warn_types_mismatch): Don't call xstrdup for the
second demangled name. second demangled name.
...@@ -6196,8 +6196,9 @@ vectorizable_reduction (stmt_vec_info stmt_info, slp_tree slp_node, ...@@ -6196,8 +6196,9 @@ vectorizable_reduction (stmt_vec_info stmt_info, slp_tree slp_node,
return false; return false;
} }
if (direct_internal_fn_supported_p (IFN_FOLD_EXTRACT_LAST, if (reduc_chain_length == 1
vectype_in, OPTIMIZE_FOR_SPEED)) && direct_internal_fn_supported_p (IFN_FOLD_EXTRACT_LAST,
vectype_in, OPTIMIZE_FOR_SPEED))
{ {
if (dump_enabled_p ()) if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment