Landing: 5e9087929abf
Project / Subsystem
gcc / gcc/phiopt
Date
2026-08-04
Author
Jakub Jelinek
Commit
5e9087929abff340ff8b132da837372875c584aa
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/phiopt
- patch_id
- —
- commit_hash
- 5e9087929abff340ff8b132da837372875c584aa
- source_type
- github
- headline
- Fixes miscompilation in spaceship_replacement optimization.
- tldr
- Corrects an optimization that incorrectly simplified multiple comparisons.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • gcc
- • compiler bug
- • comparison
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-04T00:00:00.000Z
An optimization pass, phiopt, incorrectly simplified sequences of three comparisons (e.g., checking if a value is equal to, less than, or greater than another) into a single comparison. This led to miscompilation, particularly when dealing with floating-point comparisons and HONOR_NANS. The fix ensures that the optimization correctly distinguishes between different comparison outcomes and preserves the necessary checks, resolving the issue for the affected test cases.