Commit 7f52eb89 by Richard Sandiford Committed by Richard Sandiford

Require equal type sizes for vectorised calls

As explained in the comment, vectorizable_call needs more work to
support mixtures of sizes.  This avoids testsuite fallout for
later SVE patches.

2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-stmts.c (vectorizable_call): Require the types
	to have the same size.

From-SVN: r278239
parent 2df41500
2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vectorizable_call): Require the types
to have the same size.
2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vectorizable_call): If an operand is
constant or external, use get_vectype_for_scalar_type
rather than get_same_sized_vectype to get its vector type.
......@@ -3309,6 +3309,19 @@ vectorizable_call (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
return false;
}
/* FORNOW: we don't yet support mixtures of vector sizes for calls,
just mixtures of nunits. E.g. DI->SI versions of __builtin_ctz*
are traditionally vectorized as two VnDI->VnDI IFN_CTZs followed
by a pack of the two vectors into an SI vector. We would need
separate code to handle direct VnDI->VnSI IFN_CTZs. */
if (TYPE_SIZE (vectype_in) != TYPE_SIZE (vectype_out))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"mismatched vector sizes %T and %T\n",
vectype_in, vectype_out);
return false;
}
/* FORNOW */
nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
......
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