summaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-02-04 17:18:42 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-02-04 17:18:42 +0000
commit0c7a6b6477cac6192712b14016e706fd100172b1 (patch)
tree0f01b35c4f0cfe41d4baec3bc63477c890db8dcd /lib/Target
parent83918a2ad2bb225e045151386a681a1466f36bbf (diff)
downloadllvm-0c7a6b6477cac6192712b14016e706fd100172b1.tar.gz
llvm-0c7a6b6477cac6192712b14016e706fd100172b1.tar.bz2
llvm-0c7a6b6477cac6192712b14016e706fd100172b1.tar.xz
R600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies
There is no lit test for this, because it would be too big and complicated, but it does fix a crash in the Arithm/Absdiff.* OpenCV test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/R600/SIFixSGPRCopies.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/R600/SIFixSGPRCopies.cpp b/lib/Target/R600/SIFixSGPRCopies.cpp
index 3370c7955b..f0065ea13c 100644
--- a/lib/Target/R600/SIFixSGPRCopies.cpp
+++ b/lib/Target/R600/SIFixSGPRCopies.cpp
@@ -187,7 +187,7 @@ bool SIFixSGPRCopies::isVGPRToSGPRCopy(const MachineInstr &Copy,
DstRC == &AMDGPU::M0RegRegClass)
return false;
- SrcRC = inferRegClassFromDef(TRI, MRI, SrcReg, SrcSubReg);
+ SrcRC = TRI->getSubRegClass(MRI.getRegClass(SrcReg), SrcSubReg);
return TRI->isSGPRClass(DstRC) && TRI->hasVGPRs(SrcRC);
}