summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjingyu <jingyu@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-07 17:55:27 +0000
committerjingyu <jingyu@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-07 17:55:27 +0000
commit95940f48e8c3ef361a03edfded7db569e9164daa (patch)
treed4bea74ec43fb7211269386251a79889cd9cc06b
parent1651aa771c5d90bfcf9456a86670e430b6eb49a7 (diff)
downloadgcc-95940f48e8c3ef361a03edfded7db569e9164daa.tar.gz
2010-07-07 Wei Guozhi <carrot@google.com>
* config/arm/thumb2.md (peephole2 to convert zero_extract/compare of lowest bits to lshift/compare): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161929 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/thumb2.md23
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 45e211a531f..e3330dc4150 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-07 Wei Guozhi <carrot@google.com>
+
+ * config/arm/thumb2.md (peephole2 to convert zero_extract/compare
+ of lowest bits to lshift/compare): New.
+
2010-07-07 Tom Tromey <tromey@redhat.com>
* doc/tm.texi: Update.
diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md
index 2e03b8d6430..77f1ac49f49 100644
--- a/gcc/config/arm/thumb2.md
+++ b/gcc/config/arm/thumb2.md
@@ -1501,3 +1501,26 @@
VOIDmode, operands[0], const0_rtx);
")
+(define_peephole2
+ [(set (match_operand:CC_NOOV 0 "cc_register" "")
+ (compare:CC_NOOV (zero_extract:SI
+ (match_operand:SI 1 "low_register_operand" "")
+ (match_operand:SI 2 "const_int_operand" "")
+ (const_int 0))
+ (const_int 0)))
+ (match_scratch:SI 3 "l")
+ (set (pc)
+ (if_then_else (match_operator:CC_NOOV 4 "equality_operator"
+ [(match_dup 0) (const_int 0)])
+ (match_operand 5 "" "")
+ (match_operand 6 "" "")))]
+ "TARGET_THUMB2
+ && (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) < 32)"
+ [(parallel [(set (match_dup 0)
+ (compare:CC_NOOV (ashift:SI (match_dup 1) (match_dup 2))
+ (const_int 0)))
+ (clobber (match_dup 3))])
+ (set (pc)
+ (if_then_else (match_op_dup 4 [(match_dup 0) (const_int 0)])
+ (match_dup 5) (match_dup 6)))]
+ ")