Landing: 568d439f1d1f
Project / Subsystem
gcc / i386
Date
2026-05-20
Author
Jakub Jelinek
Commit
568d439f1d1f65eabed55a54da812a865dc5c946
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- i386
- patch_id
- —
- commit_hash
- 568d439f1d1f65eabed55a54da812a865dc5c946
- source_type
- github
- headline
- i386: Fix Peephole2s With const359_operand
- tldr
- Fixes an ICE on i386 by ensuring peephole optimizations for multiplications avoid using the stack pointer as an index register.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • i386
- • optimization
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-20T00:00:00.000Z
This commit fixes an internal compiler error (ICE) on i386. The const359_operand peephole optimization was incorrectly attempting to transform multiplications of the stack pointer (%rsp) by 3, 5, or 9 into a lea instruction, which is invalid because the stack pointer cannot be used as an index register. The fix ensures that the optimization uses index_reg_operand to prevent the stack pointer from being used as an index register.