]> gcc.gnu.org Git - gcc.git/commitdiff
i386: Remove unnecessary clobbers from combine splitters.
authorUros Bizjak <ubizjak@gmail.com>
Wed, 30 Dec 2020 16:41:21 +0000 (17:41 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 30 Dec 2020 16:42:15 +0000 (17:42 +0100)
There is no need for combine splitters to emit insn patterns with clobbers,
the pass is smart enough to add clobbers to patterns  as necessary.

2020-12-30  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
* config/i386/i386.md: Remove unnecessary clobbers
from combine splitters.

gcc/config/i386/i386.md

index d7cd3df995ce3b0677cfa0b95a8bd3c9d338be8d..ea1a0706dcb9d758c0f2a596f0d642d9daf67faa 100644 (file)
          [(not:SWI (match_operand:SWI 2 "register_operand"))
           (match_operand:SWI 3 "nonimmediate_operand")]))]
   ""
-  [(parallel
-     [(set (reg:CCC FLAGS_REG)
-          (compare:CCC
-            (plus:SWI (match_dup 2) (match_dup 3))
-            (match_dup 2)))
-      (clobber (scratch:SWI))])
+  [(set (reg:CCC FLAGS_REG)
+       (compare:CCC
+         (plus:SWI (match_dup 2) (match_dup 3))
+         (match_dup 2)))
    (set (match_dup 0)
        (match_op_dup 1 [(reg:CCC FLAGS_REG) (const_int 0)]))])
 
           (match_operand 3 "const_int_operand")]))]
   "TARGET_64BIT
    && IN_RANGE (exact_log2 (UINTVAL (operands[3]) + 1), 32, 63)"
-  [(parallel
-     [(set (reg:CCZ FLAGS_REG)
-          (compare:CCZ
-            (lshiftrt:DI (match_dup 2) (match_dup 4))
-            (const_int 0)))
-      (clobber (scratch:DI))])
+  [(set (reg:CCZ FLAGS_REG)
+       (compare:CCZ
+         (lshiftrt:DI (match_dup 2) (match_dup 4))
+         (const_int 0)))
    (set (match_dup 0)
        (match_op_dup 1 [(reg:CCZ FLAGS_REG) (const_int 0)]))]
 {
          (label_ref (match_operand 0))
          (pc)))]
   ""
-  [(parallel
-     [(set (reg:CCC FLAGS_REG)
-          (compare:CCC
-            (plus:SWI (match_dup 2) (match_dup 3))
-            (match_dup 2)))
-      (clobber (scratch:SWI))])
+  [(set (reg:CCC FLAGS_REG)
+       (compare:CCC
+         (plus:SWI (match_dup 2) (match_dup 3))
+         (match_dup 2)))
    (set (pc)
        (if_then_else (match_op_dup 1 [(reg:CCC FLAGS_REG) (const_int 0)])
                      (label_ref (match_operand 0))
          (pc)))]
   "TARGET_64BIT
    && IN_RANGE (exact_log2 (UINTVAL (operands[3]) + 1), 32, 63)"
-  [(parallel
-     [(set (reg:CCZ FLAGS_REG)
-          (compare:CCZ
-            (lshiftrt:DI (match_dup 2) (match_dup 4))
-            (const_int 0)))
-      (clobber (scratch:DI))])
+  [(set (reg:CCZ FLAGS_REG)
+       (compare:CCZ
+         (lshiftrt:DI (match_dup 2) (match_dup 4))
+         (const_int 0)))
    (set (pc)
        (if_then_else (match_op_dup 1 [(reg:CCZ FLAGS_REG) (const_int 0)])
                      (label_ref (match_operand 0))
    && INTVAL (operands[2]) != -1
    && INTVAL (operands[2]) != 2147483647"
   [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2)))
-   (parallel [(set (match_dup 0)
-                  (neg:SWI48 (ltu:SWI48 (reg:CC FLAGS_REG) (const_int 0))))
-             (clobber (reg:CC FLAGS_REG))])]
+   (set (match_dup 0)
+       (neg:SWI48 (ltu:SWI48 (reg:CC FLAGS_REG) (const_int 0))))]
   "operands[2] = GEN_INT (INTVAL (operands[2]) + 1);")
 
 (define_split
            (const_int 0))))]
   ""
   [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (const_int 1)))
-   (parallel [(set (match_dup 0)
-                  (neg:SWI (ltu:SWI (reg:CC FLAGS_REG) (const_int 0))))
-             (clobber (reg:CC FLAGS_REG))])])
+   (set (match_dup 0)
+       (neg:SWI (ltu:SWI (reg:CC FLAGS_REG) (const_int 0))))])
 
 (define_split
   [(set (match_operand:SWI 0 "register_operand")
            (match_operand 1 "int_nonimmediate_operand")
            (const_int 0))))]
   ""
-  [(parallel [(set (reg:CCC FLAGS_REG)
-                  (ne:CCC (match_dup 1) (const_int 0)))
-             (clobber (match_dup 2))])
-   (parallel [(set (match_dup 0)
-                  (neg:SWI (ltu:SWI (reg:CCC FLAGS_REG) (const_int 0))))
-             (clobber (reg:CC FLAGS_REG))])]
-  "operands[2] = gen_rtx_SCRATCH (GET_MODE (operands[1]));")
+  [(set (reg:CCC FLAGS_REG)
+       (ne:CCC (match_dup 1) (const_int 0)))
+   (set (match_dup 0)
+       (neg:SWI (ltu:SWI (reg:CCC FLAGS_REG) (const_int 0))))])
 
 (define_insn "*mov<mode>cc_noc"
   [(set (match_operand:SWI248 0 "register_operand" "=r,r")
This page took 0.082188 seconds and 5 git commands to generate.