[llvm] [AtomicExpand] Preserve AA metadata when rewriting atomic operations (PR #206418)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 03:12:24 PDT 2026


antoniofrighetto wrote:

Hmm, agree that, at least for TBAA, I'm not sure preserving it onto a widened access is actually safe (which also makes me wonder if the comment on the helper:

https://github.com/llvm/llvm-project/blob/9550cd76cadea9f25a5c0bf3ee06e9f7ce5631ed/llvm/lib/CodeGen/AtomicExpandPass.cpp#L234-L235

might be a bit misleading). Not sure if it could make sense to have an extra IsWidened boolean to skip !tbaa / !alias.scope when unsafe. The other rewriters would look fine.

https://github.com/llvm/llvm-project/pull/206418


More information about the llvm-commits mailing list