[llvm] [AtomicExpand] Preserve AA metadata when rewriting atomic operations (PR #206418)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 04:55:50 PDT 2026
ayrai-gb wrote:
> 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.
I understood the concern, should I close the pr or go with `iswidened` approach for tbaa?
https://github.com/llvm/llvm-project/pull/206418
More information about the llvm-commits
mailing list