[llvm] [LangRef] asm clobber constrains: '~memory' allows reads and synchronization (PR #150191)
Ralf Jung via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 13 07:53:55 PST 2025
RalfJung wrote:
> I do find it somewhat confusing that we have all of ~{memory}, asm sideffect and memory(...) on the call-site. I believe from a middle-end perspective, the only thing that actually matters is memory(...).
The docs for `memory(...)` does not talk about synchronization at all... does that mean a `memory(none)` may contain fences, and a `memory(read)` can do acquire reads?
IIUC, `~memory` *adds* to the list of things this asm block may do, while `memory(...)` *removes* capabilities that would otherwise be present. Is that correct?
https://github.com/llvm/llvm-project/pull/150191
More information about the llvm-commits
mailing list