Use "clobber (scratch:M)" instad of "clobber (match_scratch:M N)" in expanders.

2020-05-05  Uroš Bizjak  <ubiz...@gmail.com>

    * config/i386/i386.md (fixuns_trunc<mode>si2): Use
    "clobber (scratch:M)" instad of "clobber (match_scratch:M N)".
    (addqi3_cconly_overflow): Ditto.
    (umulv<mode>4): Ditto.
    (<s>mul<mode>3_highpart): Ditto.
    (tls_global_dynamic_32): Ditto.
    (tls_local_dynamic_base_32): Ditto.
    (atanxf2): Ditto.
    (asinxf2): Ditto.
    (acosxf2): Ditto.
    (logxf2): Ditto.
    (log10xf2): Ditto.
    (log2xf2): Ditto.
    (*adddi_4): Remove "m" constraint from scratch operand.
    (*add<mode>_4): Ditto.

No functional changes.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline.

Uros.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 5cad481fd9f..898bb946a2d 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -4591,8 +4591,8 @@
          (unsigned_fix:SI
            (match_operand:MODEF 1 "nonimmediate_operand")))
      (use (match_dup 2))
-     (clobber (match_scratch:<ssevecmode> 3))
-     (clobber (match_scratch:<ssevecmode> 4))])]
+     (clobber (scratch:<ssevecmode>))
+     (clobber (scratch:<ssevecmode>))])]
   "(!TARGET_64BIT || TARGET_AVX512F) && TARGET_SSE2 && TARGET_SSE_MATH"
 {
   machine_mode mode = <MODE>mode;
@@ -5660,7 +5660,7 @@
        (compare
          (match_operand:DI 1 "nonimmediate_operand" "0")
          (match_operand:DI 2 "x86_64_immediate_operand" "e")))
-   (clobber (match_scratch:DI 0 "=rm"))]
+   (clobber (match_scratch:DI 0 "=r"))]
   "TARGET_64BIT
    && ix86_match_ccmode (insn, CCGCmode)"
 {
@@ -5705,7 +5705,7 @@
        (compare
          (match_operand:SWI124 1 "nonimmediate_operand" "0")
          (match_operand:SWI124 2 "const_int_operand" "n")))
-   (clobber (match_scratch:SWI124 0 "=<r>m"))]
+   (clobber (match_scratch:SWI124 0 "=<r>"))]
   "ix86_match_ccmode (insn, CCGCmode)"
 {
   switch (get_attr_type (insn))
@@ -6955,7 +6955,7 @@
               (match_operand:QI 0 "nonimmediate_operand")
               (match_operand:QI 1 "general_operand"))
             (match_dup 0)))
-      (clobber (match_scratch:QI 2))])]
+      (clobber (scratch:QI))])]
   "!(MEM_P (operands[0]) && MEM_P (operands[1]))")
 
 (define_insn "*add<mode>3_cconly_overflow_1"
@@ -7591,7 +7591,7 @@
                              (mult:SWI248 (match_dup 1) (match_dup 2)))))
              (set (match_operand:SWI248 0 "register_operand")
                   (mult:SWI248 (match_dup 1) (match_dup 2)))
-             (clobber (match_scratch:SWI248 4))])
+             (clobber (scratch:SWI248))])
    (set (pc) (if_then_else
               (eq (reg:CCO FLAGS_REG) (const_int 0))
               (label_ref (match_operand 3))
@@ -7810,7 +7810,7 @@
                         (any_extend:<DWI>
                           (match_operand:DWIH 2 "register_operand")))
                       (match_dup 3))))
-             (clobber (match_scratch:DWIH 4))
+             (clobber (scratch:DWIH))
              (clobber (reg:CC FLAGS_REG))])]
   ""
   "operands[3] = GEN_INT (GET_MODE_BITSIZE (<MODE>mode));")
@@ -14825,8 +14825,8 @@
                      (match_operand 3 "constant_call_address_operand")
                      (reg:SI SP_REG)]
                     UNSPEC_TLS_GD))
-     (clobber (match_scratch:SI 4))
-     (clobber (match_scratch:SI 5))
+     (clobber (scratch:SI))
+     (clobber (scratch:SI))
      (clobber (reg:CC FLAGS_REG))])]
   ""
   "ix86_tls_descriptor_calls_expanded_in_cfun = true;")
@@ -14942,8 +14942,8 @@
             (match_operand 2 "constant_call_address_operand")
             (reg:SI SP_REG)]
            UNSPEC_TLS_LD_BASE))
-      (clobber (match_scratch:SI 3))
-      (clobber (match_scratch:SI 4))
+      (clobber (scratch:SI))
+      (clobber (scratch:SI))
       (clobber (reg:CC FLAGS_REG))])]
   ""
   "ix86_tls_descriptor_calls_expanded_in_cfun = true;")
@@ -15979,7 +15979,7 @@
                   (unspec:XF [(match_dup 2)
                               (match_operand:XF 1 "register_operand")]
                              UNSPEC_FPATAN))
-             (clobber (match_scratch:XF 3))])]
+             (clobber (scratch:XF))])]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
   "operands[2] = force_reg (XFmode, CONST1_RTX (XFmode));")
@@ -16008,9 +16008,9 @@
    (set (match_dup 4) (minus:XF (match_dup 3) (match_dup 2)))
    (set (match_dup 5) (sqrt:XF (match_dup 4)))
    (parallel [(set (match_operand:XF 0 "register_operand")
-                  (unspec:XF [(match_dup 5) (match_dup 1)]
+                  (unspec:XF [(match_dup 5) (match_dup 1)]
                              UNSPEC_FPATAN))
-             (clobber (match_scratch:XF 6))])]
+             (clobber (scratch:XF))])]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
 {
@@ -16046,9 +16046,9 @@
    (set (match_dup 4) (minus:XF (match_dup 3) (match_dup 2)))
    (set (match_dup 5) (sqrt:XF (match_dup 4)))
    (parallel [(set (match_operand:XF 0 "register_operand")
-                  (unspec:XF [(match_dup 1) (match_dup 5)]
+                  (unspec:XF [(match_dup 1) (match_dup 5)]
                              UNSPEC_FPATAN))
-             (clobber (match_scratch:XF 6))])]
+             (clobber (scratch:XF))])]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
 {
@@ -16260,7 +16260,7 @@
   [(parallel [(set (match_operand:XF 0 "register_operand")
                   (unspec:XF [(match_operand:XF 1 "register_operand")
                               (match_dup 2)] UNSPEC_FYL2X))
-             (clobber (match_scratch:XF 3))])]
+             (clobber (scratch:XF))])]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
 {
@@ -16289,7 +16289,7 @@
   [(parallel [(set (match_operand:XF 0 "register_operand")
                   (unspec:XF [(match_operand:XF 1 "register_operand")
                               (match_dup 2)] UNSPEC_FYL2X))
-             (clobber (match_scratch:XF 3))])]
+             (clobber (scratch:XF))])]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
 {
@@ -16318,7 +16318,7 @@
   [(parallel [(set (match_operand:XF 0 "register_operand")
                   (unspec:XF [(match_operand:XF 1 "register_operand")
                               (match_dup 2)] UNSPEC_FYL2X))
-             (clobber (match_scratch:XF 3))])]
+             (clobber (scratch:XF))])]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
   "operands[2] = force_reg (XFmode, CONST1_RTX (XFmode));")

Reply via email to