i386.md (*cmpxf_i387): Change operand 2 predicate to reg_or_0_operand.
authorUros Bizjak <ubizjak@gmail.com>
Fri, 5 Oct 2018 17:07:17 +0000 (19:07 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 5 Oct 2018 17:07:17 +0000 (19:07 +0200)
* config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
to reg_or_0_operand.  Add "C" constraint.
(*cmpxf_cc_i387): Ditto.
(*cmp<mode>_i387): Change operand 2 predicate
to nonimm_or_0_operand.  Add "C" constraint.
(*cmp<mode>_cc_i387): Ditto.
(*cmp<mode>_0_i387): Remove insn pattern.
(*cmp<mode>_0_cc_i387): Ditto.

From-SVN: r264879

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

index ad39b8396948ca22b662903b79acd8a2a6623e9d..3451e7bae25c56c47c1c68575cfc136177504938 100644 (file)
@@ -1,3 +1,14 @@
+2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
+       to reg_or_0_operand.  Add "C" constraint.
+       (*cmpxf_cc_i387): Ditto.
+       (*cmp<mode>_i387): Change operand 2 predicate
+       to nonimm_or_0_operand.  Add "C" constraint.
+       (*cmp<mode>_cc_i387): Ditto.
+       (*cmp<mode>_0_i387): Remove insn pattern.
+       (*cmp<mode>_0_cc_i387): Ditto.
+
 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
index b8d4589bd0c8c0785058ee86195c2a1cd5d61257..d7afb6a0bdaf63e26c91900849fb2fe466d7c496 100644 (file)
   DONE;
 })
 
-
 ;; FP compares, step 1:
 ;; Set the FP condition codes and move fpsr to ax.
 
 ;; We may not use "#" to split and emit these
 ;; due to reg-stack pops killing fpsr.
 
-(define_insn "*cmp<mode>_0_i387"
-  [(set (match_operand:HI 0 "register_operand" "=a")
-       (unspec:HI
-         [(compare:CCFP
-            (match_operand:X87MODEF 1 "register_operand" "f")
-            (match_operand:X87MODEF 2 "const0_operand"))]
-       UNSPEC_FNSTSW))]
-  "TARGET_80387"
-  "* return output_fp_compare (insn, operands, false, false);"
-  [(set_attr "type" "multi")
-   (set_attr "unit" "i387")
-   (set_attr "mode" "<MODE>")])
-
-(define_insn_and_split "*cmp<mode>_0_cc_i387"
-  [(set (reg:CCFP FLAGS_REG)
-       (compare:CCFP
-         (match_operand:X87MODEF 1 "register_operand" "f")
-         (match_operand:X87MODEF 2 "const0_operand")))
-   (clobber (match_operand:HI 0 "register_operand" "=a"))]
-  "TARGET_80387 && TARGET_SAHF && !TARGET_CMOVE"
-  "#"
-  "&& reload_completed"
-  [(set (match_dup 0)
-       (unspec:HI
-         [(compare:CCFP (match_dup 1)(match_dup 2))]
-       UNSPEC_FNSTSW))
-   (set (reg:CC FLAGS_REG)
-       (unspec:CC [(match_dup 0)] UNSPEC_SAHF))]
-  ""
-  [(set_attr "type" "multi")
-   (set_attr "unit" "i387")
-   (set_attr "mode" "<MODE>")])
-
 (define_insn "*cmpxf_i387"
   [(set (match_operand:HI 0 "register_operand" "=a")
        (unspec:HI
          [(compare:CCFP
             (match_operand:XF 1 "register_operand" "f")
-            (match_operand:XF 2 "register_operand" "f"))]
+            (match_operand:XF 2 "reg_or_0_operand" "fC"))]
          UNSPEC_FNSTSW))]
   "TARGET_80387"
   "* return output_fp_compare (insn, operands, false, false);"
   [(set (reg:CCFP FLAGS_REG)
        (compare:CCFP
          (match_operand:XF 1 "register_operand" "f")
-         (match_operand:XF 2 "register_operand" "f")))
+         (match_operand:XF 2 "reg_or_0_operand" "fC")))
    (clobber (match_operand:HI 0 "register_operand" "=a"))]
   "TARGET_80387 && TARGET_SAHF && !TARGET_CMOVE"
   "#"
        (unspec:HI
          [(compare:CCFP
             (match_operand:MODEF 1 "register_operand" "f")
-            (match_operand:MODEF 2 "nonimmediate_operand" "fm"))]
+            (match_operand:MODEF 2 "nonimm_or_0_operand" "fmC"))]
          UNSPEC_FNSTSW))]
   "TARGET_80387"
   "* return output_fp_compare (insn, operands, false, false);"
   [(set (reg:CCFP FLAGS_REG)
        (compare:CCFP
          (match_operand:MODEF 1 "register_operand" "f")
-         (match_operand:MODEF 2 "nonimmediate_operand" "fm")))
+         (match_operand:MODEF 2 "nonimm_or_0_operand" "fmC")))
    (clobber (match_operand:HI 0 "register_operand" "=a"))]
   "TARGET_80387 && TARGET_SAHF && !TARGET_CMOVE"
   "#"