Landing: 8b90726a28bb
Project / Subsystem
gcc / gcc
Date
2026-09-28
Author
Richard Biener
Commit
8b90726a28bb63038b4f80242c7f5af7f53b60ff
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- 8b90726a28bb63038b4f80242c7f5af7f53b60ff
- source_type
- github
- headline
- Preserve comparison operand order when if-combining
- tldr
- Fixes FP exception trapping by ensuring comparison operands maintain their original order during if-combining.
- author
- Richard Biener
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • floating-point
- • tree-ssa
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-28T00:00:00.000Z
This commit corrects the order of comparison operands passed to maybe_fold_and_comparisons during the ifcombine_ifandif optimization. Incorrect operand order could lead to the loss of IEEE exception trapping for outer comparisons, which is essential for floating-point correctness. The change ensures that comparisons are processed in their original order, preserving trapping behavior, while noting that further refactoring might be needed for and_comparisons_1 due to its reliance on SSA defs.