Skip to content

Commit 4a577c3

Browse files
madhur13490madhur13490
authored andcommitted
[AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit
Reviewers: arsenm, foad, rampitec, scott.linder Reviewed By: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D84391
1 parent 945ed22 commit 4a577c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/AMDGPU/SIFrameLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
274274
return;
275275
}
276276

277+
// For GFX9.
277278
BuildMI(MBB, I, DL, TII->get(AMDGPU::S_ADD_U32), AMDGPU::FLAT_SCR_LO)
278279
.addReg(FlatScrInitLo)
279280
.addReg(ScratchWaveOffsetReg);
@@ -284,7 +285,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
284285
return;
285286
}
286287

287-
assert(ST.getGeneration() < AMDGPUSubtarget::GFX10);
288+
assert(ST.getGeneration() < AMDGPUSubtarget::GFX9);
288289

289290
// Copy the size in bytes.
290291
BuildMI(MBB, I, DL, TII->get(AMDGPU::COPY), AMDGPU::FLAT_SCR_LO)

0 commit comments

Comments
 (0)