pdp11.md (lshrsi3, lshrhi3): Use add for decrement.
authorPaul Koning <ni1d@arrl.net>
Tue, 9 Nov 2010 15:16:54 +0000 (10:16 -0500)
committerPaul Koning <pkoning@gcc.gnu.org>
Tue, 9 Nov 2010 15:16:54 +0000 (10:16 -0500)
* config/pdp11/pdp11.md (lshrsi3, lshrhi3): Use add for
decrement.

From-SVN: r166493

gcc/ChangeLog
gcc/config/pdp11/pdp11.md

index de4d484..5053dd7 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-09  Paul Koning  <ni1d@arrl.net>
+
+       * config/pdp11/pdp11.md (lshrsi3, lshrhi3): Use add for
+       decrement. 
+
 2010-11-09  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/46177
index 552eb49..8f5f919 100644 (file)
   if (GET_CODE (operands[2]) != CONST_INT)
     {
       r = gen_reg_rtx (HImode);
-      emit_insn (gen_subhi3 (r, operands [2], GEN_INT (1)));
+      emit_insn (gen_addhi3 (r, operands [2], GEN_INT (-1)));
       emit_insn (gen_ashrsi3 (operands[0], operands[0], r));
     }
   else if ((unsigned) INTVAL (operands[2]) != 1)
   if (GET_CODE (operands[2]) != CONST_INT)
     {
       r = gen_reg_rtx (HImode);
-      emit_insn (gen_subhi3 (r, operands [2], GEN_INT (1)));
+      emit_insn (gen_addhi3 (r, operands [2], GEN_INT (-1)));
       emit_insn (gen_ashrhi3 (operands[0], operands[0], r));
     }
   else if ((unsigned) INTVAL (operands[2]) != 1)