[llvm] [AMDGPU] Treat GEP offsets as signed in AMDGPUPromoteAlloca (PR #157682)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 01:35:08 PDT 2025
================
@@ -474,7 +477,7 @@ static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca,
return Offset;
ConstantInt *ConstIndex =
- ConstantInt::get(OffsetType, IndexQuot.getZExtValue());
+ ConstantInt::get(OffsetType, IndexQuot.getSExtValue());
Value *IndexAdd = Builder.CreateAdd(ConstIndex, Offset);
----------------
ritter-x2a wrote:
Since that changes other test outputs as well, I opened a new PR, #157810, for that.
https://github.com/llvm/llvm-project/pull/157682
More information about the llvm-commits
mailing list