i386: Use "clobber (scratch)" in expanders
authorUros Bizjak <ubizjak@gmail.com>
Tue, 5 May 2020 16:01:06 +0000 (18:01 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Tue, 5 May 2020 16:01:06 +0000 (18:01 +0200)
Use "clobber (scratch:M)" instad of "clobber (match_scratch:M N)" in expanders.

* 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.

gcc/ChangeLog
gcc/config/i386/i386.md

index b1c0759ca28c8140d73c2b5d7962945ff504c78e..92fdacff545dab27ba186b660e337b697bc5c29e 100644 (file)
@@ -1,3 +1,21 @@
+2020-05-05  Uroš Bizjak  <ubizjak@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.
+
 2020-05-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/94516
 
 2020-05-03  Uroš Bizjak  <ubizjak@gmail.com>
 
-        * config/i386/i386-expand.c (ix86_expand_int_movcc):
+       * config/i386/i386-expand.c (ix86_expand_int_movcc):
        Use plus_constant instead of gen_rtx_PLUS with GEN_INT.
        (emit_memmov): Ditto.
        (emit_memset): Ditto.
index 5cad481fd9f038d8e88e6537b927bf38e52035d4..898bb946a2d0ec8728bdb5211fda4c8640ff4212 100644 (file)
          (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;
        (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)"
 {
        (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))
               (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"
                              (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))
                         (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));")
                      (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;")
             (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;")
                   (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));")
    (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"
 {
    (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"
 {
   [(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"
 {
   [(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"
 {
   [(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));")