aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-01-31 17:05:03 +0000
committerNicolas Pitre <nico@gcc.gnu.org>2006-01-31 17:05:03 +0000
commit0cb381f0424c0212a0a7d432804b4fd92bec837c (patch)
tree3339eb0a3739ab4767b5d5c18af70934c28d0067 /gcc
parentaa2192f89e15c5586205d0ef5083cb39bf676a43 (diff)
downloadgcc-0cb381f0424c0212a0a7d432804b4fd92bec837c.zip
gcc-0cb381f0424c0212a0a7d432804b4fd92bec837c.tar.gz
gcc-0cb381f0424c0212a0a7d432804b4fd92bec837c.tar.bz2
arm.md (smaxsi3): Make aware of smax_m1.
* arm.md (smaxsi3): Make aware of smax_m1. (smax_m1): New. From-SVN: r110443
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/arm.md11
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d26968f..04a4770 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 2442ed3..3853afc 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -2481,7 +2481,7 @@
(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],
@@ -2500,6 +2500,15 @@
[(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")