[llvm] [AMDGPU] Update PromoteAlloca to handle GEPs with variable offset. (PR #122342)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 20:51:39 PST 2025
================
@@ -385,13 +385,42 @@ static bool isSupportedMemset(MemSetInst *I, AllocaInst *AI,
match(I->getOperand(2), m_SpecificInt(Size)) && !I->isVolatile();
}
+static bool hasVariableOffset(GetElementPtrInst *GEP) {
----------------
arsenm wrote:
You can easily check if the operation is dead. This pass is essentially doing the same thing as SROA, which checks isInstructionTriviallyDead
https://github.com/llvm/llvm-project/pull/122342
More information about the llvm-commits
mailing list