Landing: 5cc9ef64063c

Project / Subsystem

gcc / builtins

Date

2026-09-21

Author

Matt Turner

Commit

5cc9ef64063c45cac1d67fcdaba9258fbaf21a8c

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
builtins
patch_id
—
commit_hash
5cc9ef64063c45cac1d67fcdaba9258fbaf21a8c
source_type
github
headline
builtins: build fpclassify on the classification optabs [PR66462]
tldr
Built-in fpclassify now uses specialized classification optabs for better accuracy and to avoid spurious exceptions.
author
Matt Turner
outcome
committed
performance_win
true
breaking_change
false
series_id
gcc:builtins: build fpclassify on the classification optabs [pr66462]
series_parts
[]
tags
  • • builtins
  • • floating-point
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-09-21T00:00:00.000Z

The __builtin_fpclassify function now leverages target-specific classification optabs, such as isnan, isinf, and isnormal, when available. This change replaces direct floating-point comparisons, which could lead to incorrect results or trap on signaling NaNs and subnormal numbers on certain architectures like AArch64 and LoongArch. The new implementation uses bit manipulation for improved accuracy.