]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Sep 2018 18:53:01 +0000 (18:53 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Sep 2018 18:53:01 +0000 (18:53 +0000)
Update callers to gen_fix_trunc<mode>_i387_fisttp
(fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
nonimmediate_operand.
(fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
and corresponding splitters.
(*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
(fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
(fix_truncdi_i387_with_temp): Remove insn pattern
and corresponding splitters.
(fix_trunc<mode>_i387): Change operand 0 predicate to
nonimmediate_operand.
(fix_trunc<mode>_i387_with_temp): Remove insn pattern
and corresponding splitters.
(*fistdi2_1): Remove.
(fistdi2): Ditto.
(fistdi2_with_temp): Remove insn pattern and corresponding splitters.
(lrintxfdi2): Remove expander.  Reimplement as define_insn.
(*fist<mode>2_1): Remove.
(fist<mode>2): Ditto.
(fist<mode>2_with_temp): Remove insn pattern and corresponding
splitters.
(lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
(*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
(fistdi2_<rounding>): Change operand 0 predicate to
nonimmediate_operand.
(fistdi2_<rounding>_with_temp): Remove insn pattern
and corresponding splitters.
(fist<mode>2_<rounding>): Change operand 0 predicate to
nonimmediate_operand.
(fist<mode>2_<rounding>_with_temp): Remove insn pattern
and corresponding splitters.

(*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264148 138bc75d-0d04-0410-961f-82ee72b054a4

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

index f8fedba6171098ba420234f8c0a7b9e29013126d..d83d77fa31689dd4f799f78660ef567eaae871d2 100644 (file)
@@ -1,3 +1,40 @@
+2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
+       Update callers to gen_fix_trunc<mode>_i387_fisttp
+       (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
+       nonimmediate_operand.
+       (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
+       and corresponding splitters.
+       (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
+       (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
+       (fix_truncdi_i387_with_temp): Remove insn pattern
+       and corresponding splitters.
+       (fix_trunc<mode>_i387): Change operand 0 predicate to
+       nonimmediate_operand.
+       (fix_trunc<mode>_i387_with_temp): Remove insn pattern
+       and corresponding splitters.
+       (*fistdi2_1): Remove.
+       (fistdi2): Ditto.
+       (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
+       (lrintxfdi2): Remove expander.  Reimplement as define_insn.
+       (*fist<mode>2_1): Remove.
+       (fist<mode>2): Ditto.
+       (fist<mode>2_with_temp): Remove insn pattern and corresponding
+       splitters.
+       (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
+       (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
+       (fistdi2_<rounding>): Change operand 0 predicate to
+       nonimmediate_operand.
+       (fistdi2_<rounding>_with_temp): Remove insn pattern
+       and corresponding splitters.
+       (fist<mode>2_<rounding>): Change operand 0 predicate to
+       nonimmediate_operand.
+       (fist<mode>2_<rounding>_with_temp): Remove insn pattern
+       and corresponding splitters.
+
+       (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
+
 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
index aa904c24cd407f10911ab696475bbf466e829e15..a35c8a55cc6d41f0c2a1eb1f0aa368d17ff7ea24 100644 (file)
 {
   if (TARGET_FISTTP)
    {
-     emit_insn (gen_fix_truncdi_fisttp_i387_1 (operands[0], operands[1]));
+     emit_insn (gen_fix_truncdi_i387_fisttp (operands[0], operands[1]));
      DONE;
    }
 })
   if (TARGET_FISTTP
       && !(TARGET_64BIT && SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))
    {
-     emit_insn (gen_fix_truncdi_fisttp_i387_1 (operands[0], operands[1]));
+     emit_insn (gen_fix_truncdi_i387_fisttp (operands[0], operands[1]));
      DONE;
    }
   if (TARGET_64BIT && SSE_FLOAT_MODE_P (<MODE>mode))
 {
   if (TARGET_FISTTP)
    {
-     emit_insn (gen_fix_truncsi_fisttp_i387_1 (operands[0], operands[1]));
+     emit_insn (gen_fix_truncsi_i387_fisttp (operands[0], operands[1]));
      DONE;
    }
 })
   if (TARGET_FISTTP
       && !(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))
    {
-     emit_insn (gen_fix_truncsi_fisttp_i387_1 (operands[0], operands[1]));
+     emit_insn (gen_fix_truncsi_i387_fisttp (operands[0], operands[1]));
      DONE;
    }
   if (SSE_FLOAT_MODE_P (<MODE>mode))
 {
   if (TARGET_FISTTP)
    {
-     emit_insn (gen_fix_trunchi_fisttp_i387_1 (operands[0], operands[1]));
+     emit_insn (gen_fix_trunchi_i387_fisttp (operands[0], operands[1]));
      DONE;
    }
 })
        (zero_extend:DI
          (unsigned_fix:SI
            (match_operand:MODEF 1 "nonimmediate_operand" "vm"))))]
-  "TARGET_64BIT && TARGET_AVX512F"
+  "TARGET_64BIT && TARGET_AVX512F && TARGET_SSE_MATH"
   "vcvtt<ssemodesuffix>2usi\t{%1, %k0|%k0, %1}"
   [(set_attr "type" "sseicvt")
    (set_attr "prefix" "evex")
   [(set (match_dup 2) (match_dup 1))
    (set (match_dup 0) (fix:SWI48 (match_dup 2)))])
 
-(define_insn_and_split "fix_trunc<mode>_fisttp_i387_1"
-  [(set (match_operand:SWI248x 0 "nonimmediate_operand")
-       (fix:SWI248x (match_operand 1 "register_operand")))]
-  "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
-   && TARGET_FISTTP
-   && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
-        && (TARGET_64BIT || <MODE>mode != DImode))
-       && TARGET_SSE_MATH)
-   && can_create_pseudo_p ()"
-  "#"
-  "&& 1"
-  [(const_int 0)]
-{
-  if (memory_operand (operands[0], VOIDmode))
-    emit_insn (gen_fix_trunc<mode>_i387_fisttp (operands[0], operands[1]));
-  else
-    {
-      operands[2] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
-      emit_insn (gen_fix_trunc<mode>_i387_fisttp_with_temp (operands[0],
-                                                           operands[1],
-                                                           operands[2]));
-    }
-  DONE;
-}
-  [(set_attr "type" "fisttp")
-   (set_attr "mode" "<MODE>")])
-
 (define_insn "fix_trunc<mode>_i387_fisttp"
-  [(set (match_operand:SWI248x 0 "memory_operand" "=m")
+  [(set (match_operand:SWI248x 0 "nonimmediate_operand" "=m")
        (fix:SWI248x (match_operand 1 "register_operand" "f")))
    (clobber (match_scratch:XF 2 "=&1f"))]
   "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
   [(set_attr "type" "fisttp")
    (set_attr "mode" "<MODE>")])
 
-(define_insn "fix_trunc<mode>_i387_fisttp_with_temp"
-  [(set (match_operand:SWI248x 0 "nonimmediate_operand" "=m,?r")
-       (fix:SWI248x (match_operand 1 "register_operand" "f,f")))
-   (clobber (match_operand:SWI248x 2 "memory_operand" "=X,m"))
-   (clobber (match_scratch:XF 3 "=&1f,&1f"))]
-  "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
-   && TARGET_FISTTP
-   && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
-       && (TARGET_64BIT || <MODE>mode != DImode))
-       && TARGET_SSE_MATH)"
-  "#"
-  [(set_attr "type" "fisttp")
-   (set_attr "mode" "<MODE>")])
-
-(define_split
-  [(set (match_operand:SWI248x 0 "register_operand")
-       (fix:SWI248x (match_operand 1 "register_operand")))
-   (clobber (match_operand:SWI248x 2 "memory_operand"))
-   (clobber (match_scratch 3))]
-  "reload_completed"
-  [(parallel [(set (match_dup 2) (fix:SWI248x (match_dup 1)))
-             (clobber (match_dup 3))])
-   (set (match_dup 0) (match_dup 2))])
-
-(define_split
-  [(set (match_operand:SWI248x 0 "memory_operand")
-       (fix:SWI248x (match_operand 1 "register_operand")))
-   (clobber (match_operand:SWI248x 2 "memory_operand"))
-   (clobber (match_scratch 3))]
-  "reload_completed"
-  [(parallel [(set (match_dup 0) (fix:SWI248x (match_dup 1)))
-             (clobber (match_dup 3))])])
-
 ;; See the comments in i386.h near OPTIMIZE_MODE_SWITCHING for the description
 ;; of the machinery. Please note the clobber of FLAGS_REG. In i387 control
 ;; word calculation (inserted by LCM in mode switching pass) a FLAGS_REG
 
   operands[2] = assign_386_stack_local (HImode, SLOT_CW_STORED);
   operands[3] = assign_386_stack_local (HImode, SLOT_CW_TRUNC);
-  if (memory_operand (operands[0], VOIDmode))
-    emit_insn (gen_fix_trunc<mode>_i387 (operands[0], operands[1],
-                                        operands[2], operands[3]));
-  else
-    {
-      operands[4] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
-      emit_insn (gen_fix_trunc<mode>_i387_with_temp (operands[0], operands[1],
-                                                    operands[2], operands[3],
-                                                    operands[4]));
-    }
+
+  emit_insn (gen_fix_trunc<mode>_i387 (operands[0], operands[1],
+                                      operands[2], operands[3]));
   DONE;
 }
   [(set_attr "type" "fistp")
    (set_attr "mode" "<MODE>")])
 
 (define_insn "fix_truncdi_i387"
-  [(set (match_operand:DI 0 "memory_operand" "=m")
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m")
        (fix:DI (match_operand 1 "register_operand" "f")))
    (use (match_operand:HI 2 "memory_operand" "m"))
    (use (match_operand:HI 3 "memory_operand" "m"))
    (set_attr "i387_cw" "trunc")
    (set_attr "mode" "DI")])
 
-(define_insn "fix_truncdi_i387_with_temp"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
-       (fix:DI (match_operand 1 "register_operand" "f,f")))
-   (use (match_operand:HI 2 "memory_operand" "m,m"))
-   (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:DI 4 "memory_operand" "=X,m"))
-   (clobber (match_scratch:XF 5 "=&1f,&1f"))]
-  "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
-   && !TARGET_FISTTP
-   && !(TARGET_64BIT && SSE_FLOAT_MODE_P (GET_MODE (operands[1])))"
-  "#"
-  [(set_attr "type" "fistp")
-   (set_attr "i387_cw" "trunc")
-   (set_attr "mode" "DI")])
-
-(define_split
-  [(set (match_operand:DI 0 "register_operand")
-       (fix:DI (match_operand 1 "register_operand")))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:DI 4 "memory_operand"))
-   (clobber (match_scratch 5))]
-  "reload_completed"
-  [(parallel [(set (match_dup 4) (fix:DI (match_dup 1)))
-             (use (match_dup 2))
-             (use (match_dup 3))
-             (clobber (match_dup 5))])
-   (set (match_dup 0) (match_dup 4))])
-
-(define_split
-  [(set (match_operand:DI 0 "memory_operand")
-       (fix:DI (match_operand 1 "register_operand")))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:DI 4 "memory_operand"))
-   (clobber (match_scratch 5))]
-  "reload_completed"
-  [(parallel [(set (match_dup 0) (fix:DI (match_dup 1)))
-             (use (match_dup 2))
-             (use (match_dup 3))
-             (clobber (match_dup 5))])])
-
 (define_insn "fix_trunc<mode>_i387"
-  [(set (match_operand:SWI24 0 "memory_operand" "=m")
+  [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m")
        (fix:SWI24 (match_operand 1 "register_operand" "f")))
    (use (match_operand:HI 2 "memory_operand" "m"))
    (use (match_operand:HI 3 "memory_operand" "m"))]
    (set_attr "i387_cw" "trunc")
    (set_attr "mode" "<MODE>")])
 
-(define_insn "fix_trunc<mode>_i387_with_temp"
-  [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r")
-       (fix:SWI24 (match_operand 1 "register_operand" "f,f")))
-   (use (match_operand:HI 2 "memory_operand" "m,m"))
-   (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))]
-  "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
-   && !TARGET_FISTTP
-   && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))"
-  "#"
-  [(set_attr "type" "fistp")
-   (set_attr "i387_cw" "trunc")
-   (set_attr "mode" "<MODE>")])
-
-(define_split
-  [(set (match_operand:SWI24 0 "register_operand")
-       (fix:SWI24 (match_operand 1 "register_operand")))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:SWI24 4 "memory_operand"))]
-  "reload_completed"
-  [(parallel [(set (match_dup 4) (fix:SWI24 (match_dup 1)))
-             (use (match_dup 2))
-             (use (match_dup 3))])
-   (set (match_dup 0) (match_dup 4))])
-
-(define_split
-  [(set (match_operand:SWI24 0 "memory_operand")
-       (fix:SWI24 (match_operand 1 "register_operand")))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:SWI24 4 "memory_operand"))]
-  "reload_completed"
-  [(parallel [(set (match_dup 0) (fix:SWI24 (match_dup 1)))
-             (use (match_dup 2))
-             (use (match_dup 3))])])
-
 (define_insn "x86_fnstcw_1"
   [(set (match_operand:HI 0 "memory_operand" "=m")
        (unspec:HI [(reg:HI FPCR_REG)] UNSPEC_FSTCW))]
   DONE;
 })
 
-(define_insn_and_split "*fistdi2_1"
-  [(set (match_operand:DI 0 "nonimmediate_operand")
-       (unspec:DI [(match_operand:XF 1 "register_operand")]
-                  UNSPEC_FIST))]
-  "TARGET_USE_FANCY_MATH_387
-   && can_create_pseudo_p ()"
-  "#"
-  "&& 1"
-  [(const_int 0)]
-{
-  if (memory_operand (operands[0], VOIDmode))
-    emit_insn (gen_fistdi2 (operands[0], operands[1]));
-  else
-    {
-      operands[2] = assign_386_stack_local (DImode, SLOT_TEMP);
-      emit_insn (gen_fistdi2_with_temp (operands[0], operands[1],
-                                        operands[2]));
-    }
-  DONE;
-}
-  [(set_attr "type" "fpspc")
-   (set_attr "mode" "DI")])
-
-(define_insn "fistdi2"
-  [(set (match_operand:DI 0 "memory_operand" "=m")
+(define_insn "lrintxfdi2"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m")
        (unspec:DI [(match_operand:XF 1 "register_operand" "f")]
                   UNSPEC_FIST))
    (clobber (match_scratch:XF 2 "=&1f"))]
   [(set_attr "type" "fpspc")
    (set_attr "mode" "DI")])
 
-(define_insn "fistdi2_with_temp"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
-       (unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
-                  UNSPEC_FIST))
-   (clobber (match_operand:DI 2 "memory_operand" "=X,m"))
-   (clobber (match_scratch:XF 3 "=&1f,&1f"))]
-  "TARGET_USE_FANCY_MATH_387"
-  "#"
-  [(set_attr "type" "fpspc")
-   (set_attr "mode" "DI")])
-
-(define_split
-  [(set (match_operand:DI 0 "register_operand")
-       (unspec:DI [(match_operand:XF 1 "register_operand")]
-                  UNSPEC_FIST))
-   (clobber (match_operand:DI 2 "memory_operand"))
-   (clobber (match_scratch 3))]
-  "reload_completed"
-  [(parallel [(set (match_dup 2) (unspec:DI [(match_dup 1)] UNSPEC_FIST))
-             (clobber (match_dup 3))])
-   (set (match_dup 0) (match_dup 2))])
-
-(define_split
-  [(set (match_operand:DI 0 "memory_operand")
-       (unspec:DI [(match_operand:XF 1 "register_operand")]
-                  UNSPEC_FIST))
-   (clobber (match_operand:DI 2 "memory_operand"))
-   (clobber (match_scratch 3))]
-  "reload_completed"
-  [(parallel [(set (match_dup 0) (unspec:DI [(match_dup 1)] UNSPEC_FIST))
-             (clobber (match_dup 3))])])
-
-(define_insn_and_split "*fist<mode>2_1"
-  [(set (match_operand:SWI24 0 "register_operand")
-       (unspec:SWI24 [(match_operand:XF 1 "register_operand")]
-                     UNSPEC_FIST))]
-  "TARGET_USE_FANCY_MATH_387
-   && can_create_pseudo_p ()"
-  "#"
-  "&& 1"
-  [(const_int 0)]
-{
-  operands[2] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
-  emit_insn (gen_fist<mode>2_with_temp (operands[0], operands[1],
-                                       operands[2]));
-  DONE;
-}
-  [(set_attr "type" "fpspc")
-   (set_attr "mode" "<MODE>")])
-
-(define_insn "fist<mode>2"
-  [(set (match_operand:SWI24 0 "memory_operand" "=m")
+(define_insn "lrintxf<mode>2"
+  [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m")
        (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")]
                      UNSPEC_FIST))]
   "TARGET_USE_FANCY_MATH_387"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "<MODE>")])
 
-(define_insn "fist<mode>2_with_temp"
-  [(set (match_operand:SWI24 0 "register_operand" "=r")
-       (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")]
-                     UNSPEC_FIST))
-   (clobber (match_operand:SWI24 2 "memory_operand" "=m"))]
-  "TARGET_USE_FANCY_MATH_387"
-  "#"
-  [(set_attr "type" "fpspc")
-   (set_attr "mode" "<MODE>")])
-
-(define_split
-  [(set (match_operand:SWI24 0 "register_operand")
-       (unspec:SWI24 [(match_operand:XF 1 "register_operand")]
-                     UNSPEC_FIST))
-   (clobber (match_operand:SWI24 2 "memory_operand"))]
-  "reload_completed"
-  [(set (match_dup 2) (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST))
-   (set (match_dup 0) (match_dup 2))])
-
-(define_split
-  [(set (match_operand:SWI24 0 "memory_operand")
-       (unspec:SWI24 [(match_operand:XF 1 "register_operand")]
-                     UNSPEC_FIST))
-   (clobber (match_operand:SWI24 2 "memory_operand"))]
-  "reload_completed"
-  [(set (match_dup 0) (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST))])
-
-(define_expand "lrintxf<mode>2"
-  [(set (match_operand:SWI248x 0 "nonimmediate_operand")
-     (unspec:SWI248x [(match_operand:XF 1 "register_operand")]
-                    UNSPEC_FIST))]
-  "TARGET_USE_FANCY_MATH_387")
-
 (define_expand "lrint<MODEF:mode><SWI48:mode>2"
   [(set (match_operand:SWI48 0 "nonimmediate_operand")
      (unspec:SWI48 [(match_operand:MODEF 1 "register_operand")]
 
   operands[2] = assign_386_stack_local (HImode, SLOT_CW_STORED);
   operands[3] = assign_386_stack_local (HImode, SLOT_CW_<ROUNDING>);
-  if (memory_operand (operands[0], VOIDmode))
-    emit_insn (gen_fist<mode>2_<rounding> (operands[0], operands[1],
-                                          operands[2], operands[3]));
-  else
-    {
-      operands[4] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
-      emit_insn (gen_fist<mode>2_<rounding>_with_temp
-                 (operands[0], operands[1], operands[2],
-                  operands[3], operands[4]));
-    }
+
+  emit_insn (gen_fist<mode>2_<rounding> (operands[0], operands[1],
+                                        operands[2], operands[3]));
   DONE;
 }
   [(set_attr "type" "fistp")
    (set_attr "mode" "<MODE>")])
 
 (define_insn "fistdi2_<rounding>"
-  [(set (match_operand:DI 0 "memory_operand" "=m")
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m")
        (unspec:DI [(match_operand:XF 1 "register_operand" "f")]
                   FIST_ROUNDING))
    (use (match_operand:HI 2 "memory_operand" "m"))
    (set_attr "i387_cw" "<rounding>")
    (set_attr "mode" "DI")])
 
-(define_insn "fistdi2_<rounding>_with_temp"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
-       (unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
-                  FIST_ROUNDING))
-   (use (match_operand:HI 2 "memory_operand" "m,m"))
-   (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:DI 4 "memory_operand" "=X,m"))
-   (clobber (match_scratch:XF 5 "=&1f,&1f"))]
-  "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
-  "#"
-  [(set_attr "type" "fistp")
-   (set_attr "i387_cw" "<rounding>")
-   (set_attr "mode" "DI")])
-
-(define_split
-  [(set (match_operand:DI 0 "register_operand")
-       (unspec:DI [(match_operand:XF 1 "register_operand")]
-                  FIST_ROUNDING))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:DI 4 "memory_operand"))
-   (clobber (match_scratch 5))]
-  "reload_completed"
-  [(parallel [(set (match_dup 4)
-                  (unspec:DI [(match_dup 1)] FIST_ROUNDING))
-             (use (match_dup 2))
-             (use (match_dup 3))
-             (clobber (match_dup 5))])
-   (set (match_dup 0) (match_dup 4))])
-
-(define_split
-  [(set (match_operand:DI 0 "memory_operand")
-       (unspec:DI [(match_operand:XF 1 "register_operand")]
-                  FIST_ROUNDING))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:DI 4 "memory_operand"))
-   (clobber (match_scratch 5))]
-  "reload_completed"
-  [(parallel [(set (match_dup 0)
-                  (unspec:DI [(match_dup 1)] FIST_ROUNDING))
-             (use (match_dup 2))
-             (use (match_dup 3))
-             (clobber (match_dup 5))])])
-
 (define_insn "fist<mode>2_<rounding>"
-  [(set (match_operand:SWI24 0 "memory_operand" "=m")
+  [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m")
        (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")]
                      FIST_ROUNDING))
    (use (match_operand:HI 2 "memory_operand" "m"))
    (set_attr "i387_cw" "<rounding>")
    (set_attr "mode" "<MODE>")])
 
-(define_insn "fist<mode>2_<rounding>_with_temp"
-  [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r")
-       (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f,f")]
-                     FIST_ROUNDING))
-   (use (match_operand:HI 2 "memory_operand" "m,m"))
-   (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))]
-  "TARGET_USE_FANCY_MATH_387
-   && flag_unsafe_math_optimizations"
-  "#"
-  [(set_attr "type" "fistp")
-   (set_attr "i387_cw" "<rounding>")
-   (set_attr "mode" "<MODE>")])
-
-(define_split
-  [(set (match_operand:SWI24 0 "register_operand")
-       (unspec:SWI24 [(match_operand:XF 1 "register_operand")]
-                     FIST_ROUNDING))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:SWI24 4 "memory_operand"))]
-  "reload_completed"
-  [(parallel [(set (match_dup 4)
-                  (unspec:SWI24 [(match_dup 1)] FIST_ROUNDING))
-             (use (match_dup 2))
-             (use (match_dup 3))])
-   (set (match_dup 0) (match_dup 4))])
-
-(define_split
-  [(set (match_operand:SWI24 0 "memory_operand")
-       (unspec:SWI24 [(match_operand:XF 1 "register_operand")]
-                     FIST_ROUNDING))
-   (use (match_operand:HI 2 "memory_operand"))
-   (use (match_operand:HI 3 "memory_operand"))
-   (clobber (match_operand:SWI24 4 "memory_operand"))]
-  "reload_completed"
-  [(parallel [(set (match_dup 0)
-                  (unspec:SWI24 [(match_dup 1)] FIST_ROUNDING))
-             (use (match_dup 2))
-             (use (match_dup 3))])])
-
 (define_expand "l<rounding_insn>xf<mode>2"
   [(parallel [(set (match_operand:SWI248x 0 "nonimmediate_operand")
                   (unspec:SWI248x [(match_operand:XF 1 "register_operand")]