From 141b2e9f0543021ee1d868310e01c36b235b716d Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 28 Nov 1995 10:49:46 -0700 Subject: [PATCH] pa.md (define split for (plus (reg) (large_constant)): Try another way to handle this with only 2 insns. * pa.md (define split for (plus (reg) (large_constant)): Try another way to handle this with only 2 insns. From Tege. From-SVN: r10616 --- gcc/config/pa/pa.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 782e7dc2916..4f3c92a8aa4 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -2903,7 +2903,10 @@ /* Try dividing the constant by 2, then 4, and finally 8 to see if we can get a constant which can be loaded into a register - in a single instruction (cint_ok_for_move). */ + in a single instruction (cint_ok_for_move). + + If that fails, try to negate the constant and subtract it + from our input operand. */ if (intval % 2 == 0 && cint_ok_for_move (intval / 2)) { operands[2] = GEN_INT (intval / 2); @@ -2919,6 +2922,12 @@ operands[2] = GEN_INT (intval / 8); operands[3] = GEN_INT (8); } + else if (cint_ok_for_move (-intval)) + { + emit_insn (gen_rtx (SET, VOIDmode, operands[4], GEN_INT (-intval))); + emit_insn (gen_subsi3 (operands[0], operands[1], operands[4])); + DONE; + } else FAIL; }") -- 2.30.2