Landing: f1ea3d58f0ca

Project / Subsystem

gcc / gcc/forwprop

Date

2026-07-08

Author

Konstantinos Eleftheriou

Commit

f1ea3d58f0caf819042b0ca3981af1219a8fb461

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/forwprop
patch_id
—
commit_hash
f1ea3d58f0caf819042b0ca3981af1219a8fb461
source_type
github
headline
Fold longhand wide-multiply idioms for improved performance
tldr
Optimize manual carry propagation in wide-multiply operations to use built-in widening multiply instructions.
author
Konstantinos Eleftheriou
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • performance
  • • aarch64
  • • x86-64
discussion_id_link
—
bugzilla_pr
—
date
2026-07-08T00:00:00.000Z

This commit optimizes code that manually computes a 2N-bit product on an N-bit target by folding the longhand arithmetic into a single widening multiply and a shift. This transformation leverages built-in widening multiply instructions, improving performance significantly on specific architectures. The change affects the forwprop and widening_mul passes, with performance gains up to 59% observed on certain processors. Compile times are negligibly impacted.