Landing: dcba59a336f5
Project / Subsystem
gcc / ext-dce
Date
2026-03-20
Author
Philipp Tomsich
Commit
dcba59a336f5307d577fd3bacae65258447d1803
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- ext-dce
- patch_id
- —
- commit_hash
- dcba59a336f5307d577fd3bacae65258447d1803
- source_type
- github
- headline
- ext-dce: Fix Off-By-One in Subreg Liveness for 32-Bit Modes
- tldr
- Corrects a bit liveness calculation in ext-dce, enabling lw -> lwu narrowing on RV64.
- author
- Philipp Tomsich
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • dead code elimination
- • risc-v
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-03-20T00:00:00.000Z
This commit fixes an off-by-one error in the ext-dce pass that affected the liveness analysis of subregisters, specifically for 32-bit modes. The incorrect liveness information prevented the pass from recognizing when the upper half of a 64-bit register was unused, blocking optimizations like lw -> lwu narrowing on RV64 (RISC-V 64-bit).