Landing: e88f8d7bfc81
Project / Subsystem
gcc / tree-optimization
Date
2026-05-11
Author
Richard Biener
Commit
e88f8d7bfc811f6d152c42ba009255506f5beba1
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- tree-optimization
- patch_id
- —
- commit_hash
- e88f8d7bfc811f6d152c42ba009255506f5beba1
- source_type
- github
- headline
- Loop idiom recognition avoids speculating no-op load/store.
- tldr
- GCC's loop idiom recognition avoids speculating load/store pairs for modes that cannot transfer bits, preventing undefined behavior.
- author
- Richard Biener
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • bugfix
- • loop optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-11T00:00:00.000Z
The loop idiom recognition pass in GCC was speculating load/store pairs for modes where bit transfer is impossible. This commit prevents the speculation for such modes, including boolean types and bitfield accesses. It also avoids undefined behavior when bitfield loads are out-of-bounds.