summaryrefslogtreecommitdiff
path: root/lib/Target/R600/SIFixSGPRCopies.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-11-18 18:50:20 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-11-18 18:50:20 +0000
commit204c953cd59415d7ed50b81c64906bf5a0c97455 (patch)
tree2b8cc1e70229bf1d7290795ab1db5f7137e70319 /lib/Target/R600/SIFixSGPRCopies.cpp
parentbf9ddd5e8ff207e9b9a1cd484242e8d460f3834e (diff)
downloadllvm-204c953cd59415d7ed50b81c64906bf5a0c97455.tar.gz
llvm-204c953cd59415d7ed50b81c64906bf5a0c97455.tar.bz2
llvm-204c953cd59415d7ed50b81c64906bf5a0c97455.tar.xz
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
Diffstat (limited to 'lib/Target/R600/SIFixSGPRCopies.cpp')
-rw-r--r--lib/Target/R600/SIFixSGPRCopies.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Target/R600/SIFixSGPRCopies.cpp b/lib/Target/R600/SIFixSGPRCopies.cpp
index b49fda9689..3370c7955b 100644
--- a/lib/Target/R600/SIFixSGPRCopies.cpp
+++ b/lib/Target/R600/SIFixSGPRCopies.cpp
@@ -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) {