https://gcc.gnu.org/g:2b6a76131e10592fca49006aea61844ee4894d89
commit r17-5664-g2b6a76131e10592fca49006aea61844ee4894d89 Author: Merlin Warner-Huish <[email protected]> Date: Wed Oct 28 07:17:05 2026 -0600 [PATCH] match.pd: Don't fold negated FMAs when honoring signed zeros [PR124820] 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. --- 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. 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. Diff: --- 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/testsuite/gcc.target/i386/l_fma_double_1.c | 2 +- gcc/testsuite/gcc.target/i386/l_fma_double_2.c | 2 +- gcc/testsuite/gcc.target/i386/l_fma_double_3.c | 2 +- gcc/testsuite/gcc.target/i386/l_fma_double_4.c | 2 +- gcc/testsuite/gcc.target/i386/l_fma_double_5.c | 2 +- gcc/testsuite/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(-) diff --git a/gcc/match.pd b/gcc/match.pd index b91bb0b4f2d7..d1eeb283bcbd 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -11214,7 +11214,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) @@ -11242,7 +11244,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 @@ -11256,7 +11260,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 @@ -11270,7 +11276,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 ()) @@ -11286,7 +11294,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 @@ -11300,7 +11310,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 @@ -11314,7 +11326,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 @@ -11328,7 +11342,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 000000000000..4a5356dccaa7 --- /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 000000000000..3193e4e14abc --- /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 767ee5ca63e3..4101b8b5a33d 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 f15fb3b2cfa1..d311ff65e793 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 6b67774ca911..daf5261d3c5f 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 267f6fd2d161..a1a08176405f 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 fd7fcabe5b56..c8bf9bc9b958 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 f7ab1ce5b754..e3bcbef59606 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 a4ac2cbbe009..87cf8901d5bc 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 a7509116b81e..b3105555414b 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 d88a3bfcd250..5cdbbfb3a72c 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 cb1a81cbb26f..a35098aa1910 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 3a62590d2a2e..62af65369830 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 30d8283bde39..34ca8f5ae723 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 3413beba960b..313c627978c5 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 1b9b79888506..914c41fb71fa 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 0fbe9ab9569d..842b8c2053a9 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 c9eba09fea30..9b46733f2216 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 3217d2683f6b..3cead8a4bf95 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 a22b4e2e37a7..bf65c0d574db 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 0f740569da96..9366bfe0cbb3 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 ff3010957feb..167c26e8fa10 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 1dc0271ddcf7..32732f8a1b07 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 3431ff596265..00fd23ea69be 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 1e3335562c64..6077ad25ef38 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 c4f36c8e4547..4e2529b0ace3 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" } */
