Landing: 740f6ebc5c61
Project / Subsystem
gcc / builtins
Date
2026-09-08
Author
Kyrylo Tkachov
Commit
740f6ebc5c61bef4c7dd9b9c6addc1946181f047
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- builtins
- patch_id
- —
- commit_hash
- 740f6ebc5c61bef4c7dd9b9c6addc1946181f047
- source_type
- github
- headline
- Pass access direction to get_memory_rtx
- tldr
- Improves memory operand handling in built-ins by specifying load/store direction, preserving non-trapping info.
- author
- Kyrylo Tkachov
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • builtins
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-08T00:00:00.000Z
The get_memory_rtx function in builtins.cc previously created memory operands without distinguishing between loads and stores. This led to the loss of MEM_NOTRAP information for loads, as the default assumed store semantics. This commit adds a STORE_P argument to get_memory_rtx, allowing callers to explicitly mark destinations as stores and sources as loads. This preserves precise non-trapping information for loads used in string operations and comparisons.