AMDGPU: Only add implicit super-reg def for first subreg

llvm-svn: 347572
This commit is contained in:
Matt Arsenault 2018-11-26 17:02:01 +00:00
parent 44a2253a54
commit 6384d9ea31
1 changed files with 2 additions and 2 deletions

View File

@ -901,7 +901,7 @@ bool SIRegisterInfo::restoreSGPR(MachineBasicBlock::iterator MI,
.addImm(0) // glc
.addMemOperand(MMO);
if (NumSubRegs > 1)
if (NumSubRegs > 1 && i == 0)
MIB.addReg(SuperReg, RegState::ImplicitDefine);
continue;
@ -915,7 +915,7 @@ bool SIRegisterInfo::restoreSGPR(MachineBasicBlock::iterator MI,
.addReg(Spill.VGPR)
.addImm(Spill.Lane);
if (NumSubRegs > 1)
if (NumSubRegs > 1 && i == 0)
MIB.addReg(SuperReg, RegState::ImplicitDefine);
} else {
if (OnlyToVGPR)