OSDN Git Service

PR target/14812
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Apr 2005 14:41:22 +0000 (14:41 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Apr 2005 14:41:22 +0000 (14:41 +0000)
* arm.md (addsi3_compare0_for_combiner): Delete.
(addsi3_compare0_scratch_for_combiner): Delete.
(cmpsi_neg_shiftsi): Delete.
(compare_negsi_si): New pattern.
(cmpsi_negshiftsi_si): New pattern.
(negated_cbranchsi4): Restrict to equality_operator.

* arm.md (movhi_insn_arch4): delete trailing white space from assembler
template.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97493 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 9ca63df..96e632e 100644 (file)
@@ -1,3 +1,16 @@
+2005-04-03  Richard Earnshaw  <richard.earnshaw@arm.com>
+
+       PR target/14812
+       * arm.md (addsi3_compare0_for_combiner): Delete.
+       (addsi3_compare0_scratch_for_combiner): Delete.
+       (cmpsi_neg_shiftsi): Delete.
+       (compare_negsi_si): New pattern.
+       (cmpsi_negshiftsi_si): New pattern.
+       (negated_cbranchsi4): Restrict to equality_operator.
+       
+       * arm.md (movhi_insn_arch4): delete trailing white space from assembler
+       template.
+
 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
 
        * cfghooks.c, cfgrtl.c, modulo-sched.c, config/i386/winnt.c:
index 1a1c06a..a4f914a 100644 (file)
   [(set_attr "conds" "set")]
 )
 
-;; These patterns are the same ones as the two regular addsi3_compare0
-;; patterns, except we write them slightly different - the combiner
-;; tends to generate them this way.
-(define_insn "*addsi3_compare0_for_combiner"
-  [(set (reg:CC CC_REGNUM)
-       (compare:CC
-        (match_operand:SI 1 "s_register_operand" "r,r")
-        (neg:SI (match_operand:SI 2 "arm_add_operand" "rI,L"))))
-   (set (match_operand:SI 0 "s_register_operand" "=r,r")
-       (plus:SI (match_dup 1) (match_dup 2)))]
-  "TARGET_ARM"
-  "@
-   add%?s\\t%0, %1, %2
-   sub%?s\\t%0, %1, #%n2"
-  [(set_attr "conds" "set")]
-)
-
-(define_insn "*addsi3_compare0_scratch_for_combiner"
-  [(set (reg:CC CC_REGNUM)
-       (compare:CC
-        (match_operand:SI 0 "s_register_operand" "r,r")
-        (neg:SI (match_operand:SI 1 "arm_add_operand" "rI,L"))))]
+(define_insn "*compare_negsi_si"
+  [(set (reg:CC_Z CC_REGNUM)
+       (compare:CC_Z
+        (neg:SI (match_operand:SI 0 "s_register_operand" "r"))
+        (match_operand:SI 1 "s_register_operand" "r")))]
   "TARGET_ARM"
-  "@
-   cmn%?\\t%0, %1
-   cmp%?\\t%0, #%n1"
+  "cmn%?\\t%1, %0"
   [(set_attr "conds" "set")]
 )
 
   "@
    mov%?\\t%0, %1\\t%@ movhi
    mvn%?\\t%0, #%B1\\t%@ movhi
-   str%?h\\t%1, %0\\t%@ movhi 
+   str%?h\\t%1, %0\\t%@ movhi
    ldr%?h\\t%0, %1\\t%@ movhi"
   [(set_attr "type" "*,*,store1,load1")
    (set_attr "predicable" "yes")
 (define_insn "*negated_cbranchsi4"
   [(set (pc)
        (if_then_else
-        (match_operator 0 "arm_comparison_operator"
+        (match_operator 0 "equality_operator"
          [(match_operand:SI 1 "s_register_operand" "l")
           (neg:SI (match_operand:SI 2 "s_register_operand" "l"))])
         (label_ref (match_operand 3 "" ""))
                      (const_string "alu_shift_reg")))]
 )
 
-(define_insn "*cmpsi_neg_shiftsi"
-  [(set (reg:CC CC_REGNUM)
-       (compare:CC (match_operand:SI 0 "s_register_operand" "r")
-                   (neg:SI (match_operator:SI 3 "shift_operator"
-                            [(match_operand:SI 1 "s_register_operand" "r")
-                             (match_operand:SI 2 "arm_rhs_operand" "rM")]))))]
+(define_insn "*cmpsi_negshiftsi_si"
+  [(set (reg:CC_Z CC_REGNUM)
+       (compare:CC_Z
+        (neg:SI (match_operator:SI 1 "shift_operator"
+                   [(match_operand:SI 2 "s_register_operand" "r")
+                    (match_operand:SI 3 "reg_or_int_operand" "rM")]))
+        (match_operand:SI 0 "s_register_operand" "r")))]
   "TARGET_ARM"
-  "cmn%?\\t%0, %1%S3"
+  "cmn%?\\t%0, %2%S1"
   [(set_attr "conds" "set")
-   (set_attr "shift" "1")
-   (set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "")
-                     (const_string "alu_shift")
-                     (const_string "alu_shift_reg")))]
+   (set (attr "type") (if_then_else (match_operand 3 "const_int_operand" "")
+                                   (const_string "alu_shift")
+                                   (const_string "alu_shift_reg")))]
 )
 
 ;; Cirrus SF compare instruction