The negated FMA folds in match.pd, such as -fma (a, b, c) -> fnms (a, b, c),
give the wrong sign when a * b + c is exactly zero. For example,
-fma (1.0, 1.0, -1.0) should be -0.0, since the fma rounds to +0.0 and
is then negated, but fnms (1.0, 1.0, -1.0) computes -1.0 + 1.0, which
rounds to +0.0.
PR116891 already disabled these folds for -frounding-math. With the
default rounding mode the sign of an exact zero is the only thing that
can differ, so they are also only valid when signed zeros don't matter.
This patch adds a !HONOR_SIGNED_ZEROS check to all four folds and to
their IFN_COND_* versions. With -fno-signed-zeros the folds still apply.
PR middle-end/124820
gcc/ChangeLog:
* match.pd ((negate (fmas@3 @0 @1 @2)) -> (IFN_FNMS @0 @1 @2)):
Only enable for !HONOR_SIGNED_ZEROS.
((negate (IFN_FMS@3 @0 @1 @2)) -> (IFN_FNMA @0 @1 @2)): Likewise.
((negate (IFN_FNMA@3 @0 @1 @2)) -> (IFN_FMS @0 @1 @2)): Likewise.
((negate (IFN_FNMS@3 @0 @1 @2)) -> (IFN_FMA @0 @1 @2)): Likewise.
((negate (fmas@3 @4 @0 @1 @2 @5))
-> (IFN_COND_FNMS @4 @0 @1 @2 (negate @5))): Likewise.
((negate (IFN_COND_FMS@3 @4 @0 @1 @2 @5))
-> (IFN_COND_FNMA @4 @0 @1 @2 (negate @5))): Likewise.
((negate (IFN_COND_FNMA@3 @4 @0 @1 @2 @5))
-> (IFN_COND_FMS @4 @0 @1 @2 (negate @5))): Likewise.
((negate (IFN_COND_FNMS@3 @4 @0 @1 @2 @5))
-> (IFN_COND_FMA @4 @0 @1 @2 (negate @5))): Likewise.
gcc/testsuite/ChangeLog:
* gcc.dg/pr124820.c: New test.
* gcc.target/i386/fma-pr124820.c: New test.
* gcc.target/i386/fma_double_1.c: Add -fno-signed-zeros.
* gcc.target/i386/fma_double_2.c: Likewise.
* gcc.target/i386/fma_double_3.c: Likewise.
* gcc.target/i386/fma_double_4.c: Likewise.
* gcc.target/i386/fma_double_5.c: Likewise.
* gcc.target/i386/fma_double_6.c: Likewise.
* gcc.target/i386/fma_float_1.c: Likewise.
* gcc.target/i386/fma_float_2.c: Likewise.
* gcc.target/i386/fma_float_3.c: Likewise.
* gcc.target/i386/fma_float_4.c: Likewise.
* gcc.target/i386/fma_float_5.c: Likewise.
* gcc.target/i386/fma_float_6.c: Likewise.
* gcc.target/i386/l_fma_double_1.c: Likewise.
* gcc.target/i386/l_fma_double_2.c: Likewise.
* gcc.target/i386/l_fma_double_3.c: Likewise.
* gcc.target/i386/l_fma_double_4.c: Likewise.
* gcc.target/i386/l_fma_double_5.c: Likewise.
* gcc.target/i386/l_fma_double_6.c: Likewise.
* gcc.target/i386/l_fma_float_1.c: Likewise.
* gcc.target/i386/l_fma_float_2.c: Likewise.
* gcc.target/i386/l_fma_float_3.c: Likewise.
* gcc.target/i386/l_fma_float_4.c: Likewise.
* gcc.target/i386/l_fma_float_5.c: Likewise.
* gcc.target/i386/l_fma_float_6.c: Likewise.
---
Bootstrapped and regression tested on x86_64-pc-linux-gnu. The only
new failures were the scan-assembler counts in the gcc.target/i386
fma_* and l_fma_* tests, which expected the old folds; I added
-fno-signed-zeros to those tests, and they now pass. The new tests
pass at all torture options.
I have only tested on x86_64. Other targets' negated-FMA tests may
need the same -fno-signed-zeros change.
Thanks to Kyrill Tkachov for the testcase in PR126461.
gcc/match.pd | 32 +++++++++++----
gcc/testsuite/gcc.dg/pr124820.c | 41 +++++++++++++++++++
gcc/testsuite/gcc.target/i386/fma-pr124820.c | 15 +++++++
gcc/testsuite/gcc.target/i386/fma_double_1.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_double_2.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_double_3.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_double_4.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_double_5.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_double_6.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_float_1.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_float_2.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_float_3.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_float_4.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_float_5.c | 2 +-
gcc/testsuite/gcc.target/i386/fma_float_6.c | 2 +-
.../gcc.target/i386/l_fma_double_1.c | 2 +-
.../gcc.target/i386/l_fma_double_2.c | 2 +-
.../gcc.target/i386/l_fma_double_3.c | 2 +-
.../gcc.target/i386/l_fma_double_4.c | 2 +-
.../gcc.target/i386/l_fma_double_5.c | 2 +-
.../gcc.target/i386/l_fma_double_6.c | 2 +-
gcc/testsuite/gcc.target/i386/l_fma_float_1.c | 2 +-
gcc/testsuite/gcc.target/i386/l_fma_float_2.c | 2 +-
gcc/testsuite/gcc.target/i386/l_fma_float_3.c | 2 +-
gcc/testsuite/gcc.target/i386/l_fma_float_4.c | 2 +-
gcc/testsuite/gcc.target/i386/l_fma_float_5.c | 2 +-
gcc/testsuite/gcc.target/i386/l_fma_float_6.c | 2 +-
27 files changed, 104 insertions(+), 32 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/pr124820.c
create mode 100644 gcc/testsuite/gcc.target/i386/fma-pr124820.c
diff --git a/gcc/match.pd b/gcc/match.pd
index 7e4498a1531..b35cebc83f3 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -11183,7 +11183,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_FNMS @0 @1 @2))
(simplify
(negate (fmas@3 @0 @1 @2))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_FNMS @0 @1 @2)))
(simplify
(fmas:c (nop_convert (negate @0)) @1 @2)
@@ -11211,7 +11213,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_FNMA @0 @1 @2))
(simplify
(negate (IFN_FMS@3 @0 @1 @2))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_FNMA @0 @1 @2)))
(simplify
@@ -11225,7 +11229,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_FMS @0 @1 @2))
(simplify
(negate (IFN_FNMA@3 @0 @1 @2))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_FMS @0 @1 @2)))
(simplify
@@ -11239,7 +11245,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_FMA @0 @1 @2))
(simplify
(negate (IFN_FNMS@3 @0 @1 @2))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_FMA @0 @1 @2))))
(if (canonicalize_math_after_vectorization_p ())
@@ -11255,7 +11263,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_COND_FNMS @3 @0 @1 @2 @4))
(simplify
(negate (fmas@3 @4 @0 @1 @2 @5))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_COND_FNMS @4 @0 @1 @2 (negate @5)))))
(simplify
@@ -11269,7 +11279,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_COND_FNMA @3 @0 @1 @2 @4))
(simplify
(negate (IFN_COND_FMS@3 @4 @0 @1 @2 @5))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_COND_FNMA @4 @0 @1 @2 (negate @5))))
(simplify
@@ -11283,7 +11295,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_COND_FMS @3 @0 @1 @2 @4))
(simplify
(negate (IFN_COND_FNMA@3 @4 @0 @1 @2 @5))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_COND_FMS @4 @0 @1 @2 (negate @5))))
(simplify
@@ -11297,7 +11311,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(IFN_COND_FMA @3 @0 @1 @2 @4))
(simplify
(negate (IFN_COND_FNMS@3 @4 @0 @1 @2 @5))
- (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (@3))
+ (if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
+ && !HONOR_SIGNED_ZEROS (type)
+ && single_use (@3))
(IFN_COND_FMA @4 @0 @1 @2 (negate @5)))))
/* min (clz (x), clz (y)) -> clz (x | y) and
diff --git a/gcc/testsuite/gcc.dg/pr124820.c b/gcc/testsuite/gcc.dg/pr124820.c
new file mode 100644
index 00000000000..4a5356dccaa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr124820.c
@@ -0,0 +1,41 @@
+/* PR middle-end/124820 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+__attribute__((noipa)) double
+foo (double x, double y, double z)
+{
+ return -__builtin_fma (x, y, z);
+}
+
+__attribute__((noipa)) double
+bar (double x, double y, double z)
+{
+ return -__builtin_fma (x, y, -z);
+}
+
+__attribute__((noipa)) double
+baz (double x, double y, double z)
+{
+ return -__builtin_fma (-x, y, z);
+}
+
+__attribute__((noipa)) double
+qux (double x, double y, double z)
+{
+ return -__builtin_fma (-x, y, -z);
+}
+
+int
+main ()
+{
+ /* x * y + z is exactly zero in each case, so the fma result is +0.0
+ and its negation must be -0.0. */
+ if (!__builtin_signbit (foo (1.0, 1.0, -1.0))
+ || !__builtin_signbit (foo (0.0, 0.0, -0.0))
+ || !__builtin_signbit (bar (2.0, 3.0, 6.0))
+ || !__builtin_signbit (baz (1.0, 1.0, 1.0))
+ || !__builtin_signbit (qux (1.0, 1.0, -1.0)))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/fma-pr124820.c
b/gcc/testsuite/gcc.target/i386/fma-pr124820.c
new file mode 100644
index 00000000000..3193e4e14ab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/fma-pr124820.c
@@ -0,0 +1,15 @@
+/* PR middle-end/124820 */
+/* { dg-do run } */
+/* { dg-require-effective-target fma } */
+/* { dg-options "-O2 -mfma" } */
+
+#include "fma-check.h"
+
+#define main() do_main ()
+#include "../../gcc.dg/pr124820.c"
+
+static void
+fma_test (void)
+{
+ do_main ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_1.c
b/gcc/testsuite/gcc.target/i386/fma_double_1.c
index 767ee5ca63e..4101b8b5a33 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_1.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_2.c
b/gcc/testsuite/gcc.target/i386/fma_double_2.c
index f15fb3b2cfa..d311ff65e79 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_2.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_3.c
b/gcc/testsuite/gcc.target/i386/fma_double_3.c
index 6b67774ca91..daf5261d3c5 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_3.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_4.c
b/gcc/testsuite/gcc.target/i386/fma_double_4.c
index 267f6fd2d16..a1a08176405 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_4.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_5.c
b/gcc/testsuite/gcc.target/i386/fma_double_5.c
index fd7fcabe5b5..c8bf9bc9b95 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_5.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_6.c
b/gcc/testsuite/gcc.target/i386/fma_double_6.c
index f7ab1ce5b75..e3bcbef5960 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_6.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_1.c
b/gcc/testsuite/gcc.target/i386/fma_float_1.c
index a4ac2cbbe00..87cf8901d5b 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_1.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_2.c
b/gcc/testsuite/gcc.target/i386/fma_float_2.c
index a7509116b81..b3105555414 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_2.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_3.c
b/gcc/testsuite/gcc.target/i386/fma_float_3.c
index d88a3bfcd25..5cdbbfb3a72 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_3.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_4.c
b/gcc/testsuite/gcc.target/i386/fma_float_4.c
index cb1a81cbb26..a35098aa191 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_4.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_5.c
b/gcc/testsuite/gcc.target/i386/fma_float_5.c
index 3a62590d2a2..62af6536983 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_5.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_6.c
b/gcc/testsuite/gcc.target/i386/fma_float_6.c
index 30d8283bde3..34ca8f5ae72 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_6.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma" } */
+/* { dg-options "-O2 -Wno-attributes -mfpmath=sse -mfma -fno-signed-zeros" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
index 3413beba960..313c627978c 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
index 1b9b7988850..914c41fb71f 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
index 0fbe9ab9569..842b8c2053a 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
index c9eba09fea3..9b46733f221 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
index 3217d2683f6..3cead8a4bf9 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
index a22b4e2e37a..bf65c0d574d 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
index 0f740569da9..9366bfe0cbb 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
index ff3010957fe..167c26e8fa1 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
index 1dc0271ddcf..32732f8a1b0 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
index 3431ff59626..00fd23ea69b 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
index 1e3335562c6..6077ad25ef3 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
index c4f36c8e454..4e2529b0ace 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic
-mno-fma4 -mno-avx512f -fno-signed-zeros" } */
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
--
2.43.0