OSDN Git Service

* sh.md (cmpeqsi_ior_t, cmpeqsi_and_t): Remove.
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Sep 2000 02:46:41 +0000 (02:46 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Sep 2000 02:46:41 +0000 (02:46 +0000)
(cmpeqdi_t): Add output pattern.
(cmpeqdi_t+1): Don't split when not optimizing.
Restore proper splitting operation.

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

gcc/ChangeLog
gcc/config/sh/sh.md

index 65f44a7..9e2afe1 100644 (file)
@@ -1,3 +1,10 @@
+Fri Sep  8 03:26:38 2000  J"orn Rennecke <amylaar@redhat.co.uk>
+
+       * sh.md (cmpeqsi_ior_t, cmpeqsi_and_t): Remove.
+       (cmpeqdi_t): Add output pattern.
+       (cmpeqdi_t+1): Don't split when not optimizing.
+       Restore proper splitting operation.
+
 2000-09-07  Richard Henderson  <rth@cygnus.com>
 
        * c-lex.c (process_directive): If not HANDLE_GENERIC_PRAGMAS,
index 88a7743..cbbf06e 100644 (file)
        cmp/eq  %1,%0
        cmp/eq  %1,%0")
 
-(define_insn "cmpeqsi_ior_t"
-  [(set (reg:SI 18)
-       (ior:SI (reg:SI 18)
-               (eq:SI (match_operand:SI 0 "arith_reg_operand" "r,z,r")
-                      (match_operand:SI 1 "arith_operand" "N,rI,r"))))]
-  ""
-  "@
-       bt .+4\;tst     %0,%0
-       bt .+4\;cmp/eq  %1,%0
-       bt .+4\;cmp/eq  %1,%0"
-  [(set_attr "length" "4")])
-
-(define_insn "cmpeqsi_and_t"
-  [(set (reg:SI 18)
-       (and:SI (reg:SI 18)
-               (eq:SI (match_operand:SI 0 "arith_reg_operand" "r,z,r")
-                      (match_operand:SI 1 "arith_operand" "N,rI,r"))))]
-  ""
-  "@
-       bf .+4\;tst     %0,%0
-       bf .+4\;cmp/eq  %1,%0
-       bf .+4\;cmp/eq  %1,%0"
-  [(set_attr "length" "4")])
-
 (define_insn "cmpgtsi_t"
   [(set (reg:SI 18) (gt:SI (match_operand:SI 0 "arith_reg_operand" "r,r")
                           (match_operand:SI 1 "arith_reg_or_0_operand" "r,N")))]
   [(set (reg:SI 18) (eq:SI (match_operand:DI 0 "arith_reg_operand" "r,r")
                           (match_operand:DI 1 "arith_reg_or_0_operand" "N,r")))]
   ""
-  "#"
+  "@
+       tst     %S0,%S0\;bf     %,Ldi%=\;tst    %R0,%R0\\nLdi%=:
+       cmp/eq  %S1,%S0\;bf     %,Ldi%=\;cmp/eq %R1,%R0\\nLdi%=:"
   [(set_attr "length" "6")
    (set_attr "type" "arith3b")])
 
 (define_split
   [(set (reg:SI 18) (eq:SI (match_operand:DI 0 "arith_reg_operand" "r,r")
                           (match_operand:DI 1 "arith_reg_or_0_operand" "N,r")))]
-  "reload_completed"
+;; If we applied this split when not optimizing, it would only be
+;; applied during the machine-dependent reorg, when no new basic blocks
+;; may be created.
+  "reload_completed && optimize"
   [(set (reg:SI 18) (eq:SI (match_dup 2) (match_dup 3)))
-   (set (reg:SI 18)
-       (and:SI (reg:SI 18)
-               (eq:SI (match_dup 4) (match_dup 5))))]
+   (set (pc) (if_then_else (eq (reg:SI 18) (const_int 0))
+                          (label_ref (match_dup 6))
+                          (pc)))
+   (set (reg:SI 18) (eq:SI (match_dup 4) (match_dup 5)))
+   (match_dup 6)]
   "
 {
   operands[2]
                      + (TARGET_LITTLE_ENDIAN ? 1 : 0)));
   operands[4] = gen_lowpart (SImode, operands[0]);
   operands[5] = gen_lowpart (SImode, operands[1]);
+  operands[6] = gen_label_rtx ();
 }")
 
 (define_insn "cmpgtdi_t"