[llvm] [AtomicExpand] Preserve AA metadata when rewriting atomic operations (PR #206418)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 00:08:11 PDT 2026
https://github.com/nikic requested changes to this pull request.
I'm still not convinced that this is correct. Looking at https://llvm.godbolt.org/z/3j3hW4q4T, if you move a store to the widened bytes past the initial load, wouldn't that be a miscompile? The cmpxchg loop would then be checking that the widened bytes match the value that does not take the store into account.
I don't think we can pretend that the memory op is narrower than it actually is in cases like this, where it's decomposed across multiple operations, and other memory accesses could be moved in between them based on the TBAA/aliasing metadata.
https://github.com/llvm/llvm-project/pull/206418
More information about the llvm-commits
mailing list