aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/R600/SIISelLowering.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-10-10 17:11:24 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-10-10 17:11:24 +0000
commit0f9eaaa8aa10bdb658e887782b86f03dbea79cb1 (patch)
tree1b06eb716b8934bcfcc7f104657cc3db65e3e5ab /lib/Target/R600/SIISelLowering.cpp
parent219e788dc6e38120266d366a51286739fa33123b (diff)
downloadexternal_llvm-0f9eaaa8aa10bdb658e887782b86f03dbea79cb1.zip
external_llvm-0f9eaaa8aa10bdb658e887782b86f03dbea79cb1.tar.gz
external_llvm-0f9eaaa8aa10bdb658e887782b86f03dbea79cb1.tar.bz2
R600/SI: Define a separate MIMG instruction for each possible output value type
During instruction selection, we rewrite the destination register class for MIMG instructions based on their writemasks. This creates machine verifier errors since the new register class does not match the register class in the MIMG instruction definition. We can avoid this by defining different MIMG instructions for each possible destination type and then switching to the correct instruction when we change the register class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/SIISelLowering.cpp')
-rw-r--r--lib/Target/R600/SIISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/R600/SIISelLowering.cpp b/lib/Target/R600/SIISelLowering.cpp
index 2174753..fb21f6e 100644
--- a/lib/Target/R600/SIISelLowering.cpp
+++ b/lib/Target/R600/SIISelLowering.cpp
@@ -1162,6 +1162,8 @@ void SITargetLowering::AdjustInstrPostInstrSelection(MachineInstr *MI,
case 3: RC = &AMDGPU::VReg_96RegClass; break;
}
+ unsigned NewOpcode = TII->getMaskedMIMGOp(MI->getOpcode(), BitsSet);
+ MI->setDesc(TII->get(NewOpcode));
MachineRegisterInfo &MRI = MI->getParent()->getParent()->getRegInfo();
MRI.setRegClass(VReg, RC);
}