Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile
authorChris Lattner <sabre@nondot.org>
Sun, 9 Jan 2005 19:07:54 +0000 (19:07 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 9 Jan 2005 19:07:54 +0000 (19:07 +0000)
std::__pad<wchar_t, std::char_traits<wchar_t> >::_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

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index a81dbee2406c3625682addf1524f74a46644a519..7a4697ad5bf27ffde42c47083280fe5ec476b48f 100644 (file)
@@ -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.