[PATCH] D25220: AMDGPU: Do not re-use tmpreg in spill/restore lowering
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 13:11:50 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL283369: AMDGPU: Do not re-use tmpreg in spill/restore lowering (authored by matze).
Changed prior to commit:
https://reviews.llvm.org/D25220?vs=73386&id=73687#toc
Repository:
rL LLVM
https://reviews.llvm.org/D25220
Files:
llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
Index: llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
@@ -417,13 +417,13 @@
const DebugLoc &DL = MI->getDebugLoc();
unsigned NumSubRegs = getNumSubRegsForSpillOp(MI->getOpcode());
- unsigned TmpReg = MRI.createVirtualRegister(&AMDGPU::VGPR_32RegClass);
unsigned SuperReg = MI->getOperand(0).getReg();
bool IsKill = MI->getOperand(0).isKill();
// SubReg carries the "Kill" flag when SubReg == SuperReg.
unsigned SubKillState = getKillRegState((NumSubRegs == 1) && IsKill);
for (unsigned i = 0, e = NumSubRegs; i < e; ++i) {
+ unsigned TmpReg = MRI.createVirtualRegister(&AMDGPU::VGPR_32RegClass);
unsigned SubReg = NumSubRegs == 1 ?
SuperReg : getSubReg(SuperReg, getSubRegFromChannel(i));
@@ -503,7 +503,6 @@
const DebugLoc &DL = MI->getDebugLoc();
unsigned NumSubRegs = getNumSubRegsForSpillOp(MI->getOpcode());
- unsigned TmpReg = MRI.createVirtualRegister(&AMDGPU::VGPR_32RegClass);
unsigned SuperReg = MI->getOperand(0).getReg();
// m0 is not allowed as with readlane/writelane, so a temporary SGPR and
@@ -515,6 +514,7 @@
}
for (unsigned i = 0, e = NumSubRegs; i < e; ++i) {
+ unsigned TmpReg = MRI.createVirtualRegister(&AMDGPU::VGPR_32RegClass);
unsigned SubReg = NumSubRegs == 1 ?
SuperReg : getSubReg(SuperReg, getSubRegFromChannel(i));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25220.73687.patch
Type: text/x-patch
Size: 1504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161005/283ebb30/attachment.bin>
More information about the llvm-commits
mailing list