GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
testsuite

FMA tests updated with -fno-signed-zeros for consistency

Adds -fno-signed-zeros to RISC-V and aarch64 FMA tests to fix failures.

This commit adds the -fno-signed-zeros flag to several Floating-point Fused Multiply-Add (FMA) tests in the GCC testsuite. This change addresses failures observed on aarch64 architectures where a previous compiler change restricted negated FMA folds based on signed zero behavior. Applying the flag ensures these tests pass by explicitly disabling signed zero honor, aligning them with the expected behavior for the tested folds.

In Details

A change in r17-5664 restricted certain negated FMA (fused multiply-add) folds in match.pd to only apply when !HONOR_SIGNED_ZEROS. This caused previously passing tests, particularly on aarch64 using SVE, to fail because they expected these folds to occur with the default signed-zero honoring behavior. This patch adds -fno-signed-zeros to the affected tests to re-enable these folds, resolving the regressions.

For Context
FMA
Fused Multiply-Add, an arithmetic operation that computes (a * b) + c in a single step, often with higher precision and performance than separate multiply and add operations.
signed zeros
Floating-point numbers where the sign bit distinguishes between positive zero (+0.0) and negative zero (-0.0). Some floating-point operations behave differently depending on the sign of zero.
HONOR_SIGNED_ZEROS
A compiler or target-specific configuration that determines whether floating-point operations strictly distinguish between positive and negative zeros. Disabling this often allows for more aggressive optimizations.
testsuite
A collection of test cases used to verify the correctness and performance of a compiler or software system.
aarch64
The 64-bit ARM architecture, commonly used in mobile devices and servers. GCC supports this architecture.
SVE
Scalable Vector Extension for ARM, a SIMD (Single Instruction, Multiple Data) architecture that provides variable-length vector registers.
Filed Under: testsuitefmafloating-pointaarch64signed zeros