[PATCH] D19745: AMDGPU/SI: Use v_readfirstlane_b32 when restoring SGPRs spilled to scratch
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 13:17:45 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL268295: AMDGPU/SI: Use v_readfirstlane_b32 when restoring SGPRs spilled to scratch (authored by tstellar).
Changed prior to commit:
http://reviews.llvm.org/D19745?vs=55665&id=55881#toc
Repository:
rL LLVM
http://reviews.llvm.org/D19745
Files:
llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/trunk/test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll
Index: llvm/trunk/test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll
@@ -5,7 +5,7 @@
; Make sure we are handling hazards correctly.
; CHECK: buffer_load_dword [[VHI:v[0-9]+]], off, s[{{[0-9]+:[0-9]+}}], s{{[0-9]+}} offset:12
; CHECK-NEXT: s_waitcnt vmcnt(0)
-; CHECK-NEXT: v_readlane_b32 s[[HI:[0-9]+]], [[VHI]]
+; CHECK-NEXT: v_readfirstlane_b32 s[[HI:[0-9]+]], [[VHI]]
; CHECK-NEXT: s_nop 4
; CHECK-NEXT: buffer_store_dword v0, off, s[0:[[HI]]{{\]}}, 0
; CHECK: s_endpgm
Index: llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
@@ -589,9 +589,8 @@
.addImm(i * 4) // offset
.addMemOperand(MMO);
BuildMI(*MBB, MI, DL,
- TII->getMCOpcodeFromPseudo(AMDGPU::V_READLANE_B32), SubReg)
+ TII->get(AMDGPU::V_READFIRSTLANE_B32), SubReg)
.addReg(TmpReg, RegState::Kill)
- .addImm(0)
.addReg(MI->getOperand(0).getReg(), RegState::ImplicitDefine);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19745.55881.patch
Type: text/x-patch
Size: 1372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160502/d0ad0d0e/attachment-0001.bin>
More information about the llvm-commits
mailing list