From ee8f14a79972fbed5b8b8d141e79854622c53f59 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 15 Sep 2011 21:20:49 +0000 Subject: Some legalization fixes for atomic load and store. llvm-svn: 139851 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index e672512256f..1337ef2242b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2971,7 +2971,7 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node, } case ISD::ATOMIC_LOAD: { // There is no libcall for atomic load; fake it with ATOMIC_CMP_SWAP. - SDValue Zero = DAG.getConstant(0, cast(Node)->getMemoryVT()); + SDValue Zero = DAG.getConstant(0, Node->getValueType(0)); SDValue Swap = DAG.getAtomic(ISD::ATOMIC_CMP_SWAP, dl, cast(Node)->getMemoryVT(), Node->getOperand(0), -- cgit v1.2.3