Landing: aac02c966618

Project / Subsystem

gcc / gcc/optimization

Date

2026-07-09

Author

Konstantinos Eleftheriou

Commit

aac02c9666184d19334a0527ec444b5e55fbd113

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/optimization
patch_id
—
commit_hash
aac02c9666184d19334a0527ec444b5e55fbd113
source_type
github
headline
widening_mul: Lower long-multiply chains to inline longhand
tldr
Improves long-multiply optimization by lowering wide intermediate products to N-bit operations when target support is lacking.
author
Konstantinos Eleftheriou
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gcc
  • • optimization
  • • widening_mul
  • • long-multiply
discussion_id_link
—
bugzilla_pr
—
date
2026-07-09T00:00:00.000Z

This commit enhances the widening_mul optimization pass by introducing a mechanism to lower intermediate wide multiply products back to N-bit operations. When the target architecture cannot efficiently handle the full 2N-bit result of a multiply, this pass now breaks down the calculation into smaller, N-bit partial products that can be handled, improving code generation for such cases. It also refines how operands wider than N bits are split and how results are materialized in GIMPLE.