Skip to content

Commit de6978e

Browse files
author
Jakub Chlanda
committed
[AMDGPU] Assert previous SGPR exists when bundling preloaded args
1 parent ff78cd5 commit de6978e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,6 +2537,7 @@ void SITargetLowering::allocatePreloadKernArgSGPRs(
25372537

25382538
// Arg is preloaded into the previous SGPR.
25392539
if (ArgLoc.getLocVT().getStoreSize() < 4 && Alignment < 4) {
2540+
assert(InIdx >= 1 && "No previous SGPR");
25402541
Info.getArgInfo().PreloadKernArgs[InIdx].Regs.push_back(
25412542
Info.getArgInfo().PreloadKernArgs[InIdx - 1].Regs[0]);
25422543
continue;

0 commit comments

Comments
 (0)