Landing: 6f32166346de

Project / Subsystem

gcc / range-op-float

Date

2026-07-31

Author

Jakub Jelinek

Commit

6f32166346de2d1c0f6253e4fe37e8a6edac655d

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
range-op-float
patch_id
—
commit_hash
6f32166346de2d1c0f6253e4fe37e8a6edac655d
source_type
github
headline
range-op-float: Improve infinity handling in reverse floating-point operations
tldr
Fixes incorrect range calculations for reverse floating-point operations involving infinity.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • compiler
  • • optimization
  • • floating-point
  • • range analysis
discussion_id_link
—
bugzilla_pr
—
date
2026-07-31T00:00:00.000Z

This commit improves the handling of infinity in reverse floating-point operations, addressing miscompilations that occurred with specific range analyses. Previously, ranges like [-inf, -inf] were incorrectly propagated in reverse operations, leading to wrong results when converting between floating-point types. The fix now correctly widens the bounds of infinity ranges by 1 unit in the penultimate representation, ensuring accurate results for conversions and other operations.