Landing: dbda2911da5b
Project / Subsystem
gcc / middle-end
Date
2026-09-14
Author
Kyrylo Tkachov
Commit
dbda2911da5be5e11b7c776893fbc96938acf3ce
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- middle-end
- patch_id
- —
- commit_hash
- dbda2911da5be5e11b7c776893fbc96938acf3ce
- source_type
- github
- headline
- Restore MEM_NOTRAP for memory-only loads
- tldr
- Restores non-trapping information for memory-only loads used in inline assembly and partial loads.
- author
- Kyrylo Tkachov
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • middle-end
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-14T00:00:00.000Z
This commit addresses situations where memory-only loads lose their MEM_NOTRAP attribute. This occurs when EXPAND_MEMORY is used, which, due to conservative store semantics, discards the non-trapping information. The fix involves restoring the MEM_NOTRAP flag for inline assembly inputs and partial loads by explicitly setting it based on tree_could_trap_p after using EXPAND_MEMORY or EXPAND_WRITE.