R600/SI: Fix illegal VGPR->SGPR copy inside of loop

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard
2013-11-18 18:50:20 +00:00
parent bf9ddd5e8f
commit 204c953cd5
2 changed files with 32 additions and 2 deletions

View File

@@ -188,8 +188,7 @@ bool SIFixSGPRCopies::isVGPRToSGPRCopy(const MachineInstr &Copy,
return false;
SrcRC = inferRegClassFromDef(TRI, MRI, SrcReg, SrcSubReg);
return TRI->isSGPRClass(DstRC) &&
!TRI->getCommonSubClass(DstRC, SrcRC);
return TRI->isSGPRClass(DstRC) && TRI->hasVGPRs(SrcRC);
}
bool SIFixSGPRCopies::runOnMachineFunction(MachineFunction &MF) {