Commit 7831ef17 by Richard Kenner

(expand_divmod): Correctly set CAN_CLOBBER_OP0 when we've converted OP0

to COMPUTE_MODE.

From-SVN: r7349
parent 7beec59e
......@@ -2439,13 +2439,16 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
modifying it. */
can_clobber_op0 = (GET_CODE (op0) == REG && op0 == target);
/* Now convert to the best mode to use. Show we made a copy of OP0
/* Now convert to the best mode to use. Normally show we made a copy of OP0
and hence we can clobber it (we cannot use a SUBREG to widen
something. */
something), but check that the conversion wasn't a no-op due to
promotion. */
if (compute_mode != mode)
{
adjusted_op0 = op0 = convert_modes (compute_mode, mode, op0, unsignedp);
can_clobber_op0 = 1;
adjusted_op0 = convert_modes (compute_mode, mode, op0, unsignedp);
can_clobber_op0 = ! (GET_CODE (op0) == SUBREG
&& SUBREG_REG (op0) == adjusted_op0);
op0 = adjusted_op0;
op1 = convert_modes (compute_mode, mode, op1, unsignedp);
}
......
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