R600/SI: Handle arbitrary destination type in SITargetLowering::adjustWritemask
authorTom Stellard <thomas.stellard@amd.com>
Mon, 6 May 2013 23:02:15 +0000 (23:02 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 6 May 2013 23:02:15 +0000 (23:02 +0000)
Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181268 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIISelLowering.cpp

index 1a07affc195a5ae8b0e43e67450c4a8f995aa1a6..6bd82a5d774ad509a6e9d42869d9fa9007549628 100644 (file)
@@ -756,7 +756,7 @@ void SITargetLowering::adjustWritemask(MachineSDNode *&Node,
   if (Writemask == (1U << Lane)) {
     SDValue RC = DAG.getTargetConstant(AMDGPU::VReg_32RegClassID, MVT::i32);
     SDNode *Copy = DAG.getMachineNode(TargetOpcode::COPY_TO_REGCLASS,
-                                      DebugLoc(), MVT::f32,
+                                      DebugLoc(), Users[Lane]->getValueType(0),
                                       SDValue(Node, 0), RC);
     DAG.ReplaceAllUsesWith(Users[Lane], Copy);
     return;