Landing: b9c9f9350ca8
Project / Subsystem
gcc / tree-optimization
Date
2026-08-06
Author
Aldy Hernandez
Commit
b9c9f9350ca8cb8d0a59cb99b5e48f6f7328adc6
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- tree-optimization
- patch_id
- —
- commit_hash
- b9c9f9350ca8cb8d0a59cb99b5e48f6f7328adc6
- source_type
- github
- headline
- Fix floating-point range comparisons with sub-ranges.
- tldr
- Correctly handles floating-point range equality and inequality checks when sub-ranges are involved.
- author
- Aldy Hernandez
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • floating-point
- • range analysis
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-06T00:00:00.000Z
This change corrects a bug in floating-point range comparisons (== and !=) that affected cases involving sub-ranges. Previously, the compiler’s range analysis incorrectly determined equality or inequality by only examining the outer boundaries of the ranges, missing situations where a zero value could be contained within a sub-range. This led to incorrect constant folding, for instance, where e != 0.0 could be wrongly simplified to true.