diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 624933cd514..6ff7bccd61a 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1838,7 +1838,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { if (Tmp.Val) { AddLegalizedOperand(Op, Tmp); NeedsAnotherIteration = true; - return Result; + return Tmp; } else { // The target thinks this is legal afterall. break;