Landing: ba0d75df9c02
Project / Subsystem
gcc / avoid-store-forwarding
Date
2026-03-27
Author
Konstantinos Eleftheriou
Commit
ba0d75df9c02da51f212f6fe50d96b18265c7181
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- avoid-store-forwarding
- patch_id
- —
- commit_hash
- ba0d75df9c02da51f212f6fe50d96b18265c7181
- source_type
- github
- headline
- Avoid-store-forwarding: Reject bit-inserts that clobber live hard regs
- tldr
- The avoid-store-forwarding pass now avoids generating bit-insert sequences that would corrupt live hardware registers.
- author
- Konstantinos Eleftheriou
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • store-forwarding
- • register allocation
- • gcc
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-03-27T00:00:00.000Z
The avoid-store-forwarding optimization in GCC can generate bit-insert sequences that inadvertently clobber hardware registers, such as the flags register on x86, potentially corrupting flag-dependent sequences. To prevent this, the pass now performs a liveness check before applying the transformation. It identifies the hard registers clobbered by the bit-insert sequences and rejects the transformation if any of them are live at the insertion point, ensuring correctness.