[llvm-branch-commits] [llvm] AMDGPU/PromoteAlloca: Always use i32 for indexing (PR #170511)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 3 12:52:51 PST 2025
================
@@ -461,22 +461,23 @@ static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca,
return nullptr;
Value *Offset = VarOffset.first;
- auto *OffsetType = dyn_cast<IntegerType>(Offset->getType());
- if (!OffsetType)
+ if (!isa<IntegerType>(Offset->getType()))
return nullptr;
+ Offset = Builder.CreateSExtOrTrunc(Offset, Builder.getIntNTy(BW));
----------------
arsenm wrote:
Why is this using signed anything? The indexes should be treated as unsigned?
https://github.com/llvm/llvm-project/pull/170511
More information about the llvm-branch-commits
mailing list