Landing: 82112166c1be
Project / Subsystem
gcc / tree-optimization
Date
2026-09-20
Author
Dominic P
Commit
82112166c1be0cb29d346f5c5aa0b0c0c14db3df
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- tree-optimization
- patch_id
- —
- commit_hash
- 82112166c1be0cb29d346f5c5aa0b0c0c14db3df
- source_type
- github
- headline
- Hoist shift by out-of-range count to reduce it
- tldr
- Optimize shifts with potentially out-of-range counts by hoisting and reducing them.
- author
- Dominic P
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • loop-optimizations
- • gimple
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-20T00:00:00.000Z
This change improves loop optimizations by handling shifts with unknown or out-of-range counts. Previously, such shifts could be costly or lead to incorrect masking, impacting vectorized loops. The optimization now hoists the shift operation, reduces the shift count to be within the valid range, and correctly costs the operation, preventing unnecessary masking and improving performance in certain loop scenarios.