Landing: 6d1b92ce276d

Project / Subsystem

gcc / i386

Date

2026-09-10

Author

Hongyu Wang

Commit

6d1b92ce276d4705b12c21723f94238a9d34b055

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
i386
patch_id
—
commit_hash
6d1b92ce276d4705b12c21723f94238a9d34b055
source_type
github
headline
Don't turn quiet FP comparisons into signaling ones
tldr
Ensures quiet NaN FP comparisons do not raise FE_INVALID exceptions on i386.
author
Hongyu Wang
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • i386
  • • floating-point
  • • exceptions
discussion_id_link
—
bugzilla_pr
—
date
2026-09-10T00:00:00.000Z

This commit prevents floating-point unordered comparisons on i386 from incorrectly raising the FE_INVALID exception when encountering a quiet NaN. For AVX and AVX512, the compiler now selects the dedicated quiet predicate (_UQ). For older SSE2, where only signaling predicates were available for unordered comparisons, the compiler avoids these comparisons when trapping math is enabled and NaNs are honored, thus preventing unintended exceptions.