forked from OSchip/llvm-project
[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:
parent
945ed22f33
commit
4a577c3a22
|
@ -274,6 +274,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For GFX9.
|
||||||
BuildMI(MBB, I, DL, TII->get(AMDGPU::S_ADD_U32), AMDGPU::FLAT_SCR_LO)
|
BuildMI(MBB, I, DL, TII->get(AMDGPU::S_ADD_U32), AMDGPU::FLAT_SCR_LO)
|
||||||
.addReg(FlatScrInitLo)
|
.addReg(FlatScrInitLo)
|
||||||
.addReg(ScratchWaveOffsetReg);
|
.addReg(ScratchWaveOffsetReg);
|
||||||
|
@ -284,7 +285,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(ST.getGeneration() < AMDGPUSubtarget::GFX10);
|
assert(ST.getGeneration() < AMDGPUSubtarget::GFX9);
|
||||||
|
|
||||||
// Copy the size in bytes.
|
// Copy the size in bytes.
|
||||||
BuildMI(MBB, I, DL, TII->get(AMDGPU::COPY), AMDGPU::FLAT_SCR_LO)
|
BuildMI(MBB, I, DL, TII->get(AMDGPU::COPY), AMDGPU::FLAT_SCR_LO)
|
||||||
|
|
Loading…
Reference in New Issue