rs6000.md (movsi_internal2): Use compare for self move record condition.
authorDavid Edelsohn <edelsohn@gnu.org>
Wed, 14 May 2003 16:41:16 +0000 (16:41 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Wed, 14 May 2003 16:41:16 +0000 (12:41 -0400)
        * config/rs6000/rs6000.md (movsi_internal2): Use compare for self
        move record condition.
        (movdi_internal2): Same.

From-SVN: r66806

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index f8af6e71d2cb4cbb2167131f2b87182538e5533f..2de7e1e449d2943e1da1fd1d1d0b4bd6ff64ef8b 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-14  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.md (movsi_internal2): Use compare for self
+       move record condition.
+       (movdi_internal2): Same.
+
 2003-05-14  Nathan Sidwell  <nathan@codesourcery.com>
 
        * gcov-io.h (gcov_write_bytes, gcov_read_bytes): Remove here.
index d2149d7a222ff76f5a10eba30c7275c90014e0b2..b80721d38cc06577012435ecca8ef578f7d624b0 100644 (file)
 }")
 
 (define_insn "*movsi_internal2"
-  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
-       (compare:CC (match_operand:SI 1 "gpc_reg_operand" "r,r")
+  [(set (match_operand:CC 2 "cc_reg_operand" "=y,x,?y")
+       (compare:CC (match_operand:SI 1 "gpc_reg_operand" "0,r,r")
                    (const_int 0)))
-   (set (match_operand:SI 0 "gpc_reg_operand" "=r,r") (match_dup 1))]
+   (set (match_operand:SI 0 "gpc_reg_operand" "=r,r,r") (match_dup 1))]
   "! TARGET_POWERPC64"
   "@
+   {cmpi|cmpwi} %2,%0,0
    mr. %0,%1
    #"
-  [(set_attr "type" "compare")
-   (set_attr "length" "4,8")])
-\f
+  [(set_attr "type" "cmp,compare,cmp")
+   (set_attr "length" "4,4,8")])
+
 (define_split
   [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")
        (compare:CC (match_operand:SI 1 "gpc_reg_operand" "")
        (compare:CC (match_dup 0)
                    (const_int 0)))]
   "")
-
+\f
 (define_expand "movhi"
   [(set (match_operand:HI 0 "general_operand" "")
        (match_operand:HI 1 "any_operand" ""))]
     FAIL;
 }")
 
-;; Split a load of a large constant into the appropriate five-instruction
 (define_insn "*movdi_internal2"
-  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
-       (compare:CC (match_operand:DI 1 "gpc_reg_operand" "r,r")
+  [(set (match_operand:CC 2 "cc_reg_operand" "=y,x,?y")
+       (compare:CC (match_operand:DI 1 "gpc_reg_operand" "0,r,r")
                    (const_int 0)))
-   (set (match_operand:DI 0 "gpc_reg_operand" "=r,r") (match_dup 1))]
+   (set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r") (match_dup 1))]
   "TARGET_POWERPC64"
   "@
+   cmpdi %2,%0,0
    mr. %0,%1
    #"
-  [(set_attr "type" "compare")
-   (set_attr "length" "4,8")])
+  [(set_attr "type" "cmp,compare,cmp")
+   (set_attr "length" "4,4,8")])
 
 (define_split
   [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")