Landing: 30b4b8f2baf4

Project / Subsystem

gcc / aarch64

Date

2026-08-04

Author

Tamar Christina

Commit

30b4b8f2baf42c8842233a2d075c77a01eee4d29

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
aarch64
patch_id
—
commit_hash
30b4b8f2baf42c8842233a2d075c77a01eee4d29
source_type
github
headline
Block complex multiplication when honoring signed zeros on AArch64
tldr
Prevent AArch64's complex multiplication expansion from using signed zeros to avoid incorrect results.
author
Tamar Christina
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • aarch64
  • • complex numbers
  • • floating-point
  • • signed zeros
discussion_id_link
—
bugzilla_pr
—
date
2026-08-04T00:00:00.000Z

This commit modifies the AArch64 backend to block the expansion of COMPLEX_MUL when the HONOR_SIGNED_ZEROS flag is enabled. The current emulation of COMPLEX_MUL using COMPLEX_FMA with a $+0.0$ accumulator can produce incorrect zero signs due to rounding or flushing behavior. To maintain correctness, this optimization is disabled when signed zero handling is required. This change is accompanied by test case updates to enforce the -fno-signed-zeros flag for relevant scenarios.