diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-29 20:58:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-29 20:58:36 +0000 |
commit | aac4ca60bc813a35242145a1f92f325303d5df6e (patch) | |
tree | 54239710d884acb23a5547b772e5743386c7ff0b /lib/Target/AMDGPU/SIRegisterInfo.cpp | |
parent | 02a336801959d4fc2ea0657d4489596e1ecbfee0 (diff) | |
download | src-test2-6710ae0e3c81dad4c42d5b26311891c603ea1ca1.tar.gz src-test2-6710ae0e3c81dad4c42d5b26311891c603ea1ca1.zip |
Diffstat (limited to 'lib/Target/AMDGPU/SIRegisterInfo.cpp')
-rw-r--r-- | lib/Target/AMDGPU/SIRegisterInfo.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/AMDGPU/SIRegisterInfo.cpp b/lib/Target/AMDGPU/SIRegisterInfo.cpp index 8c4b24a4504d..a1ed5e8441df 100644 --- a/lib/Target/AMDGPU/SIRegisterInfo.cpp +++ b/lib/Target/AMDGPU/SIRegisterInfo.cpp @@ -1108,10 +1108,12 @@ unsigned SIRegisterInfo::getPreloadedValue(const MachineFunction &MF, case SIRegisterInfo::PRIVATE_SEGMENT_WAVE_BYTE_OFFSET: return MFI->PrivateSegmentWaveByteOffsetSystemSGPR; case SIRegisterInfo::PRIVATE_SEGMENT_BUFFER: - assert(ST.isAmdCodeObjectV2() && - "Non-CodeObjectV2 ABI currently uses relocations"); - assert(MFI->hasPrivateSegmentBuffer()); - return MFI->PrivateSegmentBufferUserSGPR; + if (ST.isAmdCodeObjectV2(MF)) { + assert(MFI->hasPrivateSegmentBuffer()); + return MFI->PrivateSegmentBufferUserSGPR; + } + assert(MFI->hasPrivateMemoryInputPtr()); + return MFI->PrivateMemoryPtrUserSGPR; case SIRegisterInfo::KERNARG_SEGMENT_PTR: assert(MFI->hasKernargSegmentPtr()); return MFI->KernargSegmentPtrUserSGPR; |