Commit 7b64da89 by Richard Earnshaw

(arm_gen_constant, case IOR,XOR): Don't invert a constant if loading

it into a temporary.

From-SVN: r13290
parent 89418a92
...@@ -701,8 +701,8 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -701,8 +701,8 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
case IOR: case IOR:
case XOR: case XOR:
/* If we have IOR or XOR, and the inverse of the constant can be loaded /* If we have IOR or XOR, and the constant can be loaded in a
in a single instruction, and we can find a temporary to put it in, single instruction, and we can find a temporary to put it in,
then this can be done in two instructions instead of 3-4. */ then this can be done in two instructions instead of 3-4. */
if (subtargets if (subtargets
|| (reload_completed && ! reg_mentioned_p (target, source))) || (reload_completed && ! reg_mentioned_p (target, source)))
...@@ -713,8 +713,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate) ...@@ -713,8 +713,7 @@ arm_gen_constant (code, mode, val, target, source, subtargets, generate)
{ {
rtx sub = subtargets ? gen_reg_rtx (mode) : target; rtx sub = subtargets ? gen_reg_rtx (mode) : target;
emit_insn (gen_rtx (SET, VOIDmode, sub, emit_insn (gen_rtx (SET, VOIDmode, sub, GEN_INT (val)));
GEN_INT (ARM_SIGN_EXTEND (~ val))));
emit_insn (gen_rtx (SET, VOIDmode, target, emit_insn (gen_rtx (SET, VOIDmode, target,
gen_rtx (code, mode, source, sub))); gen_rtx (code, mode, source, sub)));
} }
......
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