]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.c (mips_rtx_costs): Remove HONOR_NAN check.
authorSteve Ellcey <sellcey@imgtec.com>
Thu, 18 Jun 2015 15:17:49 +0000 (15:17 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 18 Jun 2015 15:17:49 +0000 (15:17 +0000)
2015-06-18  Steve Ellcey  <sellcey@imgtec.com>

* config/mips/mips.c (mips_rtx_costs): Remove HONOR_NAN check.
* config/mips/mips.md (*madd4<mode>): Ditto.
(*nmadd3<mode>) Ditto.
(*nmadd4<mode>_fastmath): Ditto.
(*nmadd3<mode>_fastmath): Ditto.
(*nmsub4<mode>): Ditto.
(*nmsub3<mode>): Ditto.
(*nmsub4<mode>_fastmath): Ditto.
(*nmsub3<mode>_fastmath): Ditto.

From-SVN: r224625

gcc/ChangeLog
gcc/config/mips/mips.c
gcc/config/mips/mips.md

index fef6cb94002fb9421a4678176208f8c7ff6be5dd..f2ba06f61bbc4773a11c2b3f29a193093434edc4 100644 (file)
@@ -1,3 +1,15 @@
+2015-06-18  Steve Ellcey  <sellcey@imgtec.com>
+
+       * config/mips/mips.c (mips_rtx_costs): Remove HONOR_NAN check.
+       * config/mips/mips.md (*madd4<mode>): Ditto.
+       (*nmadd3<mode>) Ditto.
+       (*nmadd4<mode>_fastmath): Ditto.
+       (*nmadd3<mode>_fastmath): Ditto.
+       (*nmsub4<mode>): Ditto.
+       (*nmsub3<mode>): Ditto.
+       (*nmsub4<mode>_fastmath): Ditto.
+       (*nmsub3<mode>_fastmath): Ditto.
+
 2015-06-18  Michael Matz  <matz@suse.de>
 
        PR middle-end/66253
index d427c0c0b0730ebf8c42398407d5b830dd9b17e1..1c837cf7c901cedb2e5157c71cde1b6a8943d485 100644 (file)
@@ -4069,7 +4069,6 @@ mips_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
       if (float_mode_p
          && (ISA_HAS_NMADD4_NMSUB4 || ISA_HAS_NMADD3_NMSUB3)
          && TARGET_FUSED_MADD
-         && !HONOR_NANS (mode)
          && !HONOR_SIGNED_ZEROS (mode))
        {
          /* See if we can use NMADD or NMSUB.  See mips.md for the
@@ -4137,7 +4136,6 @@ mips_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
       if (float_mode_p
          && (ISA_HAS_NMADD4_NMSUB4 || ISA_HAS_NMADD3_NMSUB3)
          && TARGET_FUSED_MADD
-         && !HONOR_NANS (mode)
          && HONOR_SIGNED_ZEROS (mode))
        {
          /* See if we can use NMADD or NMSUB.  See mips.md for the
index 0a23fa214b0ef489ef138bd8dda989f7b2511c1a..f6912e11c2d33df82b459f1234eed0f936aff4ec 100644 (file)
 
 ;; Floating point multiply accumulate instructions.
 
+;; The various multiply accumulate instructions can be used even when
+;; HONOR_NANS is true because while IEEE 754-2008 requires the negate
+;; operation to negate the sign of a NAN and the MIPS neg instruction does
+;; not do this, the multiply and add (or minus) parts of these instructions
+;; have no requirement on how the sign of a NAN is handled and so the final
+;; sign bit of the entire operation is undefined.
+
 (define_insn "*madd4<mode>"
   [(set (match_operand:ANYF 0 "register_operand" "=f")
        (plus:ANYF (mult:ANYF (match_operand:ANYF 1 "register_operand" "f")
                   (match_operand:ANYF 3 "register_operand" "f"))))]
   "ISA_HAS_NMADD4_NMSUB4
    && TARGET_FUSED_MADD
-   && HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%3,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])
                   (match_operand:ANYF 3 "register_operand" "0"))))]
   "ISA_HAS_NMADD3_NMSUB3
    && TARGET_FUSED_MADD
-   && HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])
         (match_operand:ANYF 3 "register_operand" "f")))]
   "ISA_HAS_NMADD4_NMSUB4
    && TARGET_FUSED_MADD
-   && !HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && !HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%3,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])
         (match_operand:ANYF 3 "register_operand" "0")))]
   "ISA_HAS_NMADD3_NMSUB3
    && TARGET_FUSED_MADD
-   && !HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && !HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmadd.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])
                   (match_operand:ANYF 1 "register_operand" "f"))))]
   "ISA_HAS_NMADD4_NMSUB4
    && TARGET_FUSED_MADD
-   && HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2,%3"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])
                   (match_operand:ANYF 1 "register_operand" "0"))))]
   "ISA_HAS_NMADD3_NMSUB3
    && TARGET_FUSED_MADD
-   && HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])
                    (match_operand:ANYF 3 "register_operand" "f"))))]
   "ISA_HAS_NMADD4_NMSUB4
    && TARGET_FUSED_MADD
-   && !HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && !HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2,%3"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])
                    (match_operand:ANYF 3 "register_operand" "0"))))]
   "ISA_HAS_NMADD3_NMSUB3
    && TARGET_FUSED_MADD
-   && !HONOR_SIGNED_ZEROS (<MODE>mode)
-   && !HONOR_NANS (<MODE>mode)"
+   && !HONOR_SIGNED_ZEROS (<MODE>mode)"
   "nmsub.<fmt>\t%0,%1,%2"
   [(set_attr "type" "fmadd")
    (set_attr "mode" "<UNITMODE>")])