[llvm] [TBAA] Recover !tbaa for a memcpy of struct with same type fields (PR #214116)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 06:08:54 PDT 2026


https://github.com/antoniofrighetto commented:

I think the right place for struct-path information (!tbaa) on the memcpy would be the frontend (that is what `-new-struct-path-tbaa` was designed for, as Clang would emit !tbaa directly on the memcpy, adjustForAccess() would preserve it, and LICM may later hoist `*bound` into the preheader: https://llvm.godbolt.org/z/onz4zEPTW). Unfortunately the flag is not on by default, and hasn't been for a long time (I think it would be nice to revisit this). Maybe recovering what we can from !tbaa.struct could be reasonable for the time being.

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


More information about the llvm-commits mailing list