Landing: 006150ddc408

Project / Subsystem

gcc / gcc/optimization

Date

2026-07-08

Author

Konstantinos Eleftheriou

Commit

006150ddc40844105eb99bc6514267314715f6dc

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/optimization
patch_id
—
commit_hash
006150ddc40844105eb99bc6514267314715f6dc
source_type
github
headline
forwprop: Add long-multiply low-plus variant
tldr
Enhances long-multiply optimization by recognizing and folding a 'low-plus' variant involving cross-product and shifted low parts.
author
Konstantinos Eleftheriou
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gcc
  • • optimization
  • • forwprop
  • • long-multiply
discussion_id_link
—
bugzilla_pr
—
date
2026-07-08T00:00:00.000Z

This commit extends the forwprop optimization pass to recognize a ‘low-plus’ variant of long multiplication. This variant involves the cross-product of high and low parts of the operands, combined with a shifted low partial product. The optimization now correctly folds this pattern, especially when it’s part of a two-carry long multiplication, deferring the fold if conditional comparisons still require intermediate values. This improves code generation for specific multiplication scenarios.