Landing: 3cca524e337a

Project / Subsystem

gcc / i386

Date

2026-07-12

Author

MITSUNARI Shigeo

Commit

3cca524e337a886d479e630c7a3e6aef4656b425

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
i386
patch_id
commit_hash
3cca524e337a886d479e630c7a3e6aef4656b425
source_type
github
headline
Add BMI2 MULX instruction pattern for efficient highpart multiplication.
tldr
New MULX instruction pattern optimizes high part of unsigned multiplication on BMI2 targets.
author
MITSUNARI Shigeo
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • i386
  • optimization
  • bmi2
discussion_id_link
bugzilla_pr
date
2026-07-12T00:00:00.000Z

GCC now utilizes the BMI2 MULX instruction to directly compute the high part of an unsigned multiplication, replacing a less efficient sequence involving MULQ and a subsequent move to RDX. This optimization reduces instruction count for operations like 32-bit unsigned division by constants requiring 33-bit magic multipliers, changing the sequence from 4 to 3 instructions on BMI2-capable processors.