[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
This commit is contained in:
madhur13490 2020-07-23 09:48:03 +00:00
parent 945ed22f33
commit 4a577c3a22
1 changed files with 2 additions and 1 deletions

View File

@ -274,6 +274,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
return;
}
// For GFX9.
BuildMI(MBB, I, DL, TII->get(AMDGPU::S_ADD_U32), AMDGPU::FLAT_SCR_LO)
.addReg(FlatScrInitLo)
.addReg(ScratchWaveOffsetReg);
@ -284,7 +285,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
return;
}
assert(ST.getGeneration() < AMDGPUSubtarget::GFX10);
assert(ST.getGeneration() < AMDGPUSubtarget::GFX9);
// Copy the size in bytes.
BuildMI(MBB, I, DL, TII->get(AMDGPU::COPY), AMDGPU::FLAT_SCR_LO)