[llvm] [AMDGPU] Update PromoteAlloca to handle GEPs with variable offset. (PR #122342)
Sumanth Gundapaneni via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 09:38:35 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) {
----------------
sgundapa wrote:
> This looks like you're pre-filtering for a scenario that could happen in the map lookup. You should directly detect when this delete happens rather than assuming the set of cases it could
The deletion of this instuction happens after the transformation is done.
In the attached lit test, the dangling use of instruction is result of replaceAllUsesWith() in promoteAllocaUserToVector() . Please advise. I will make this code generic (not for a specific scenario).
https://github.com/llvm/llvm-project/pull/122342
More information about the llvm-commits
mailing list