On 11/25/2015 01:20 PM, Richard Sandiford wrote:
This series fixes PR 68432, a regression caused by my internal-functions-
for-optabs series. Some of the libm optabs in i386.md have a true HAVE_*
condition but conditionally FAIL if we're optimising for size:
if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH
&& !flag_trapping_math)
{
if (TARGET_ROUND)
emit_insn (gen_sse4_1_round<mode>2
(operands[0], operands[1], GEN_INT (ROUND_MXCSR)));
else if (optimize_insn_for_size_p ())
FAIL;
else
ix86_expand_rint (operands[0], operands[1]);
}
How many such cases are there? Is it just the ix86 patterns? And, could
the same effect be achieved by just moving the optimize_insn_for_size_p
test into the predicate (as some existing patterns already do), and then
testing the predicate while ensuring that optimize_insn_for_x returns
the right value? That seems like a minimal fix, and I think one that
would be vastly more appropriate for stage 3. The alternative splitting
looks error-prone and may not be optimal, and I still have misgivings
about the new attribute syntax and its application to define_expands.
Bernd