summaryrefslogtreecommitdiff
path: root/lib/Target/R600/SIFixSGPRCopies.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-08-22 20:21:02 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-08-22 20:21:02 +0000
commit344cfb4db4b22f3330cbfc5ccb5e1149cd4e17e3 (patch)
treeb30ef43e5c4213823db8f73bf1c55a9a306e4b83 /lib/Target/R600/SIFixSGPRCopies.cpp
parent054cec05b84e878a68e7ecc71342312e76850649 (diff)
downloadllvm-344cfb4db4b22f3330cbfc5ccb5e1149cd4e17e3.tar.gz
llvm-344cfb4db4b22f3330cbfc5ccb5e1149cd4e17e3.tar.bz2
llvm-344cfb4db4b22f3330cbfc5ccb5e1149cd4e17e3.tar.xz
R600/SI: Fix another case of illegal VGPR to SGPR copy
This fixes a crash in Unigine Tropics. https://bugs.freedesktop.org/show_bug.cgi?id=68389 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/SIFixSGPRCopies.cpp')
-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 435172a08e..7f07b01f08 100644
--- a/lib/Target/R600/SIFixSGPRCopies.cpp
+++ b/lib/Target/R600/SIFixSGPRCopies.cpp
@@ -143,7 +143,7 @@ bool SIFixSGPRCopies::runOnMachineFunction(MachineFunction &MF) {
}
unsigned Reg = MI.getOperand(0).getReg();
const TargetRegisterClass *RC = inferRegClass(TRI, MRI, Reg);
- if (RC == &AMDGPU::VSrc_32RegClass) {
+ if (TRI->getCommonSubClass(RC, &AMDGPU::VReg_32RegClass)) {
MRI.constrainRegClass(Reg, &AMDGPU::VReg_32RegClass);
}
}