Landing: 93a9ff5383a2
Project / Subsystem
gcc / frange
Date
2026-07-14
Author
Aldy Hernandez
Commit
93a9ff5383a253d5923adc0c8cc21d5eb4afce54
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- frange
- patch_id
- —
- commit_hash
- 93a9ff5383a253d5923adc0c8cc21d5eb4afce54
- source_type
- github
- headline
- frange: Add a comparison function for range endpoints
- tldr
- Introduces a precise comparison function for floating-point range endpoints, resolving signed zero issues.
- author
- Aldy Hernandez
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • frange
- • floating-point
- • analysis
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-14T00:00:00.000Z
This patch introduces frange_cmp(), a new comparison function for floating-point range endpoints within the frange (value-range) analysis. Previously, GCC’s value-range analysis treated -0.0 and +0.0 as equal, but frange distinguished them. This led to discrepancies and optimistic cache invalidations. The new function ensures -0.0 is strictly ordered below +0.0, resolving these issues and simplifying future developments like multi-range support.