From: Chris Lattner Date: Sun, 9 Jan 2005 19:07:54 +0000 (+0000) Subject: Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=513e52ec4e20048a8f491498d219a2669283f3bd;p=oota-llvm.git Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile std::__pad >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool) from libstdc++ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19416 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index a81dbee2406..7a4697ad5bf 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -315,6 +315,8 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { Tmp3 != Node->getOperand(2)) Result = DAG.getNode(ISD::DYNAMIC_STACKALLOC, Node->getValueType(0), Tmp1, Tmp2, Tmp3); + else + Result = Op.getValue(0); // Since this op produces two values, make sure to remember that we // legalized both of them.