[llvm] [SROA] Rewrite invariant group intrinsics after splitting alloca (PR #107557)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 06:30:17 PDT 2024
================
@@ -81,7 +81,8 @@ bool llvm::isAllocaPromotable(const AllocaInst *AI) {
return false;
} else if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(U)) {
if (!II->isLifetimeStartOrEnd() && !II->isDroppable() &&
- II->getIntrinsicID() != Intrinsic::fake_use)
+ II->getIntrinsicID() != Intrinsic::fake_use &&
+ !II->isLaunderOrStripInvariantGroup())
----------------
nikic wrote:
Okay, I think this gets handled here: https://github.com/llvm/llvm-project/blob/05284a071a6620cd3c5846b5ff36918da0c2e1a6/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp#L495-L507 I think the handling is ultimately correct, but the comment there could use an update.
https://github.com/llvm/llvm-project/pull/107557
More information about the llvm-commits
mailing list