Commit 3dc4195c by Richard Kenner

(convert_move): Put FROM into a register if it is a SUBREG.

From-SVN: r1732
parent 58c8c593
...@@ -705,6 +705,12 @@ convert_move (to, from, unsignedp) ...@@ -705,6 +705,12 @@ convert_move (to, from, unsignedp)
if ((code = can_extend_p (to_mode, from_mode, unsignedp)) if ((code = can_extend_p (to_mode, from_mode, unsignedp))
!= CODE_FOR_nothing) != CODE_FOR_nothing)
{ {
/* If FROM is a SUBREG, put it into a register. Do this
so that we always generate the same set of insns for
better cse'ing; if an intermediate assignment occurred,
we won't be doing the operation directly on the SUBREG. */
if (optimize > 0 && GET_CODE (from) == SUBREG)
from = force_reg (from_mode, from);
emit_unop_insn (code, to, from, equiv_code); emit_unop_insn (code, to, from, equiv_code);
return; return;
} }
......
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