[llvm] r241839 - AMDGPU/R600: Return correct chain when lowering loads

Matt Arsenault Matthew.Arsenault at amd.com
Thu Jul 9 11:47:04 PDT 2015


Author: arsenm
Date: Thu Jul  9 13:47:03 2015
New Revision: 241839

URL: http://llvm.org/viewvc/llvm-project?rev=241839&view=rev
Log:
AMDGPU/R600: Return correct chain when lowering loads

The other LowerLOAD should be returning the correct chain.

Modified:
    llvm/trunk/lib/Target/AMDGPU/R600ISelLowering.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/R600ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/R600ISelLowering.cpp?rev=241839&r1=241838&r2=241839&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/R600ISelLowering.cpp Thu Jul  9 13:47:03 2015
@@ -1460,14 +1460,8 @@ SDValue R600TargetLowering::LowerLOAD(SD
   SDValue Ptr = Op.getOperand(1);
   SDValue LoweredLoad;
 
-  SDValue Ret = AMDGPUTargetLowering::LowerLOAD(Op, DAG);
-  if (Ret.getNode()) {
-    SDValue Ops[2] = {
-      Ret,
-      Chain
-    };
-    return DAG.getMergeValues(Ops, DL);
-  }
+  if (SDValue Ret = AMDGPUTargetLowering::LowerLOAD(Op, DAG))
+    return Ret;
 
   // Lower loads constant address space global variable loads
   if (LoadNode->getAddressSpace() == AMDGPUAS::CONSTANT_ADDRESS &&





More information about the llvm-commits mailing list