Landing: 6c598e2be7d0
Project / Subsystem
gcc / gcc/optimization
Date
2026-06-25
Author
Konstantinos Eleftheriou
Commit
6c598e2be7d0adf937d3390bb8f6a16b39603016
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/optimization
- patch_id
- —
- commit_hash
- 6c598e2be7d0adf937d3390bb8f6a16b39603016
- source_type
- github
- headline
- forwprop: Add long-multiply carry-low-sum variant
- tldr
- Improves long-multiply optimization by recognizing and folding a 'carry-low-sum' variant where cross-sum and low partial products are combined.
- author
- Konstantinos Eleftheriou
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gcc
- • optimization
- • forwprop
- • long-multiply
- • carry-low-sum
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-25T00:00:00.000Z
This commit enhances the forwprop optimization pass to recognize a ‘carry-low-sum’ variant of long multiplication. This variant combines the cross sum and the low partial product into a single low_sum, and then uses an overflow compare against this low_sum to generate the carry for the higher part. The optimization now folds this pattern, which has three summands in its outer chain, improving code generation for these specific multiplication scenarios and addressing PR tree-optimization/107090.