summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTim Renouf <tpr.llvm@botech.co.uk>2018-03-28 11:21:07 +0000
committerTim Renouf <tpr.llvm@botech.co.uk>2018-03-28 11:21:07 +0000
commitcdac172e2a6d8b1efc130ede138e157e21568c85 (patch)
treef530e896fc53d92faa1f9c57a1848f67add41516 /llvm/lib/Target
parent010924e35cedc390f7f2df31928ac9b19f754d6c (diff)
downloadbcm5719-llvm-cdac172e2a6d8b1efc130ede138e157e21568c85.tar.gz
bcm5719-llvm-cdac172e2a6d8b1efc130ede138e157e21568c85.zip
Revert "[AMDGPU] For OS type AMDPAL, fixed scratch on compute shader"
This reverts commit 0daf86291d3aa04d3cc280cd0ef24abdb0174981. It was causing an assert in test/CodeGen/AMDGPU/amdpal.ll only on a release-with-asserts build. I will resubmit the change when I have fixed that. Change-Id: If270594eba27a7dc4076bdeab3fa8e6bfda3288a llvm-svn: 328695
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AMDGPU/SIFrameLowering.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
index 84cde4bafeb..a3f107b10fc 100644
--- a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -405,7 +405,7 @@ void SIFrameLowering::emitEntryFunctionScratchSetup(const SISubtarget &ST,
.addReg(ScratchRsrcReg, RegState::ImplicitDefine);
// We now have the GIT ptr - now get the scratch descriptor from the entry
- // at offset 0 (or offset 16 for a compute shader).
+ // at offset 0.
PointerType *PtrTy =
PointerType::get(Type::getInt64Ty(MF.getFunction().getContext()),
AMDGPUAS::CONSTANT_ADDRESS);
@@ -416,11 +416,9 @@ void SIFrameLowering::emitEntryFunctionScratchSetup(const SISubtarget &ST,
MachineMemOperand::MOInvariant |
MachineMemOperand::MODereferenceable,
0, 0);
- unsigned Offset
- = MF.getFunction().getCallingConv() == CallingConv::AMDGPU_CS ? 16 : 0;
BuildMI(MBB, I, DL, LoadDwordX4, ScratchRsrcReg)
.addReg(Rsrc01)
- .addImm(Offset) // offset
+ .addImm(0) // offset
.addImm(0) // glc
.addReg(ScratchRsrcReg, RegState::ImplicitDefine)
.addMemOperand(MMO);
OpenPOWER on IntegriCloud