]> gcc.gnu.org Git - gcc.git/commitdiff
arm.md (smaxsi3): Make aware of smax_m1.
authorNicolas Pitre <nico@cam.org>
Tue, 31 Jan 2006 17:05:03 +0000 (17:05 +0000)
committerNicolas Pitre <nico@gcc.gnu.org>
Tue, 31 Jan 2006 17:05:03 +0000 (17:05 +0000)
* arm.md (smaxsi3): Make aware of smax_m1.
(smax_m1): New.

From-SVN: r110443

gcc/ChangeLog
gcc/config/arm/arm.md

index d26968f30f512bb42cf5803b77fde24ab7dacaf6..04a4770b7b5da712e35bdc5a87e3e720da488776 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-31  Nicolas Pitre  <nico@cam.org>
+
+       * arm.md (smaxsi3): Make aware of smax_m1.
+       (smax_m1): New.
+
 2006-01-31  Nathan Sidwell  <nathan@codesourcery.com>
 
        * gcc/config/m68k/lb1sf68.asm: Use moveq to load small constants.
index 2442ed3f3dbcaccc7af32a9d3290f86db3aeb770..3853afc1aaca9af637ec1eeb0d23ca0b36aa1de0 100644 (file)
     (clobber (reg:CC CC_REGNUM))])]
   "TARGET_ARM"
   "
-  if (operands[2] == const0_rtx)
+  if (operands[2] == const0_rtx || operands[2] == constm1_rtx)
     {
       /* No need for a clobber of the condition code register here.  */
       emit_insn (gen_rtx_SET (VOIDmode, operands[0],
   [(set_attr "predicable" "yes")]
 )
 
+(define_insn "*smax_m1"
+  [(set (match_operand:SI 0 "s_register_operand" "=r")
+       (smax:SI (match_operand:SI 1 "s_register_operand" "r")
+                (const_int -1)))]
+  "TARGET_ARM"
+  "orr%?\\t%0, %1, %1, asr #31"
+  [(set_attr "predicable" "yes")]
+)
+
 (define_insn "*smax_insn"
   [(set (match_operand:SI          0 "s_register_operand" "=r,r")
        (smax:SI (match_operand:SI 1 "s_register_operand"  "%0,?r")
This page took 0.068863 seconds and 5 git commands to generate.