[llvm] [LLVM][MemCpyOpt] Unify alias tags if we optimize allocas (PR #129537)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 12:19:47 PDT 2025
================
@@ -1569,6 +1569,10 @@ bool MemCpyOptPass::performStackMoveOptzn(Instruction *Load, Instruction *Store,
continue;
}
}
+ if (UI->hasMetadata(LLVMContext::MD_tbaa))
+ NoAliasInstrs.insert(UI);
----------------
nikic wrote:
Though at this point it would probably make sense to just collect all instructions here (regardless of whether they have metadata) and call setMetadata on all of them, so we don't have to list the MD kinds twice.
https://github.com/llvm/llvm-project/pull/129537
More information about the llvm-commits
mailing list