Correct DEFINE_SPLITs added Jul 27.
authorJim Wilson <wilson@gcc.gnu.org>
Fri, 7 Aug 1992 01:59:27 +0000 (18:59 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 7 Aug 1992 01:59:27 +0000 (18:59 -0700)
Correct DEFINE_SPLITs added Jul 27.  They would
overwrite the input register if it was the same as the result reg.

From-SVN: r1776

gcc/config/sparc/sparc.md

index b7a739d931df39276725e06b471acadc0b8d79da..b64f949024e774021d7dfbe60d9ab14d0358ec38 100644 (file)
 (define_split
   [(set (match_operand:SI 0 "register_operand" "")
        (and:SI (match_operand:SI 1 "register_operand" "")
-               (match_operand:SI 2 "" "")))]
+               (match_operand:SI 2 "" "")))
+   (clobber (match_operand:SI 3 "register_operand" ""))]
   "GET_CODE (operands[2]) == CONST_INT
    && !SMALL_INT (operands[2])
    && (INTVAL (operands[2]) & 0x3ff) == 0x3ff"
-  [(set (match_dup 0) (match_dup 3))
-   (set (match_dup 0) (and:SI (not:SI (match_dup 0)) (match_dup 1)))]
+  [(set (match_dup 3) (match_dup 4))
+   (set (match_dup 0) (and:SI (not:SI (match_dup 3)) (match_dup 1)))]
   "
 {
-  operands[3] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
+  operands[4] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
 }")
 
 (define_insn ""
 (define_split
   [(set (match_operand:SI 0 "register_operand" "")
        (ior:SI (match_operand:SI 1 "register_operand" "")
-               (match_operand:SI 2 "" "")))]
+               (match_operand:SI 2 "" "")))
+   (clobber (match_operand:SI 3 "register_operand" ""))]
   "GET_CODE (operands[2]) == CONST_INT
    && !SMALL_INT (operands[2])
    && (INTVAL (operands[2]) & 0x3ff) == 0x3ff"
-  [(set (match_dup 0) (match_dup 3))
-   (set (match_dup 0) (ior:SI (not:SI (match_dup 0)) (match_dup 1)))]
+  [(set (match_dup 3) (match_dup 4))
+   (set (match_dup 0) (ior:SI (not:SI (match_dup 3)) (match_dup 1)))]
   "
 {
-  operands[3] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
+  operands[4] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
 }")
 
 (define_insn ""
 (define_split
   [(set (match_operand:SI 0 "register_operand" "")
        (xor:SI (match_operand:SI 1 "register_operand" "")
-               (match_operand:SI 2 "" "")))]
+               (match_operand:SI 2 "" "")))
+   (clobber (match_operand:SI 3 "register_operand" ""))]
   "GET_CODE (operands[2]) == CONST_INT
    && !SMALL_INT (operands[2])
    && (INTVAL (operands[2]) & 0x3ff) == 0x3ff"
-  [(set (match_dup 0) (match_dup 3))
-   (set (match_dup 0) (not:SI (xor:SI (match_dup 0) (match_dup 1))))]
+  [(set (match_dup 3) (match_dup 4))
+   (set (match_dup 0) (not:SI (xor:SI (match_dup 3) (match_dup 1))))]
   "
 {
-  operands[3] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
+  operands[4] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
 }")
 
 (define_split
   [(set (match_operand:SI 0 "register_operand" "")
        (not:SI (xor:SI (match_operand:SI 1 "register_operand" "")
-                       (match_operand:SI 2 "" ""))))]
+                       (match_operand:SI 2 "" ""))))
+   (clobber (match_operand:SI 3 "register_operand" ""))]
   "GET_CODE (operands[2]) == CONST_INT
    && !SMALL_INT (operands[2])
    && (INTVAL (operands[2]) & 0x3ff) == 0x3ff"
-  [(set (match_dup 0) (match_dup 3))
-   (set (match_dup 0) (xor:SI (match_dup 0) (match_dup 1)))]
+  [(set (match_dup 3) (match_dup 4))
+   (set (match_dup 0) (xor:SI (match_dup 3) (match_dup 1)))]
   "
 {
-  operands[3] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
+  operands[4] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
 }")
 
 ;; xnor patterns.  Note that (a ^ ~b) == (~a ^ b) == ~(a ^ b).