(dect): Rewrite pattern so that it can be combined.
authorJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 13 Dec 1996 19:46:28 +0000 (19:46 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 13 Dec 1996 19:46:28 +0000 (19:46 +0000)
From-SVN: r13307

gcc/config/sh/sh.md

index 07bc69afdbe33820527d05d54cffa84495d9a405..6c75623ab0bb965458897bd34c3d4209ba545e9f 100644 (file)
   ""
   "movt        %0")
 
-;; ??? This combiner pattern does not work, because combine does not combine
-;; instructions that set a hard register when SMALL_REGISTER_CLASSES is
-;; defined.  Perhaps use a pseudo-reg for the T bit?
-
 (define_insn ""
   [(set (reg:SI 18)
        (eq:SI (and:SI (match_operand:SI 0 "arith_reg_operand" "z,r")
 ;; Misc insns
 ;; ------------------------------------------------------------------------
 
-;; ??? This combiner pattern does not work, because combine does not combine
-;; instructions that set a hard register when SMALL_REGISTER_CLASSES is
-;; defined.  Perhaps use a pseudo-reg for the T bit?
-
 (define_insn "dect"
-  [(parallel [(set (match_operand:SI 0 "arith_reg_operand" "=r")
-                  (plus:SI (match_dup 0)
-                           (const_int -1)))
-             (set (reg:SI 18)
-                  (eq:SI (plus:SI (match_dup 0) (const_int -1))
-                         (const_int 0)))])]
+  [(set (reg:SI 18)
+       (eq:SI (match_operand:SI 0 "arith_reg_operand" "+r") (const_int 1)))
+   (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1)))]
   "TARGET_SH2"
   "dt  %0")