[llvm] [AMDGPU] Enable i8 GEP promotion for vector allocas (PR #166132)
Harrison Hao via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 18:47:33 PST 2025
================
@@ -456,10 +456,25 @@ static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca,
const auto &VarOffset = VarOffsets.front();
APInt OffsetQuot;
APInt::sdivrem(VarOffset.second, VecElemSize, OffsetQuot, Rem);
- if (Rem != 0 || OffsetQuot.isZero())
- return nullptr;
-
Value *Offset = VarOffset.first;
+ if (Rem != 0 || OffsetQuot.isZero()) {
----------------
harrisonGPU wrote:
Thanks, I agree your points, I have removed it.
https://github.com/llvm/llvm-project/pull/166132
More information about the llvm-commits
mailing list