[llvm] [AMDGPU] Promote allocas used by phi/select (PR #221870)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 23:40:41 PDT 2026
================
@@ -1187,16 +1420,28 @@ void AMDGPUPromoteAllocaImpl::promoteAllocaToVector(AllocaAnalysis &AA) {
I->eraseFromParent();
}
+ // The pointer phis/selects merging group members are now dead. Drop them
+ // before the GEPs they reference. RAUW with poison first so chained merges
+ // can be erased in any order.
+ for (Instruction *I : AA.Vector.PtrMerges)
+ I->replaceAllUsesWith(PoisonValue::get(I->getType()));
+ for (Instruction *I : AA.Vector.PtrMerges) {
+ assert(I->use_empty());
----------------
arsenm wrote:
These use_empty asserts are redundant
https://github.com/llvm/llvm-project/pull/221870
More information about the llvm-commits
mailing list