Commit b216b86b by John David Anglin Committed by John David Anglin

re PR middle-end/53823 (FAIL: gcc.c-torture/execute/930921-1.c execution at -O0 and -O1)

	PR middle-end/53823
	* expmed.c (expand_mult): Skip synth_mult for negative coefficients
	if the mode is larger than a wide int and it is too costly to multiply
	by a positive multiplier and negate the result.

From-SVN: r190505
parent b44e2c4c
2012-08-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR middle-end/53823
* expmed.c (expand_mult): Skip synth_mult for negative coefficients
if the mode is larger than a wide int and it is too costly to multiply
by a positive multiplier and negate the result.
2012-08-18 Steven Bosscher <steven@gcc.gnu.org> 2012-08-18 Steven Bosscher <steven@gcc.gnu.org>
* sparseset.c (sparseset_alloc): Use non-clearing allocation. Tell * sparseset.c (sparseset_alloc): Use non-clearing allocation. Tell
......
...@@ -3261,7 +3261,6 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target, ...@@ -3261,7 +3261,6 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
/* Attempt to handle multiplication of DImode values by negative /* Attempt to handle multiplication of DImode values by negative
coefficients, by performing the multiplication by a positive coefficients, by performing the multiplication by a positive
multiplier and then inverting the result. */ multiplier and then inverting the result. */
/* ??? How is this not slightly redundant with the neg variant? */
if (is_neg && mode_bitsize > HOST_BITS_PER_WIDE_INT) if (is_neg && mode_bitsize > HOST_BITS_PER_WIDE_INT)
{ {
/* Its safe to use -coeff even for INT_MIN, as the /* Its safe to use -coeff even for INT_MIN, as the
...@@ -3278,6 +3277,7 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target, ...@@ -3278,6 +3277,7 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
&algorithm, variant); &algorithm, variant);
return expand_unop (mode, neg_optab, temp, target, 0); return expand_unop (mode, neg_optab, temp, target, 0);
} }
goto skip_synth;
} }
/* Exclude cost of op0 from max_cost to match the cost /* Exclude cost of op0 from max_cost to match the cost
......
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