aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 6ed69124a6..db5c8e2ff9 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1975,13 +1975,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
case TargetLowering::Custom: {
SDOperand Tmp = TLI.LowerOperation(Result, DAG);
if (Tmp.Val) {
- SDOperand Tmp2, RetVal;
+ SDOperand Tmp2, RetVal(0,0);
for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) {
Tmp2 = LegalizeOp(Tmp.getValue(i));
AddLegalizedOperand(SDOperand(Node, i), Tmp2);
if (i == Op.ResNo)
RetVal = Tmp;
}
+ assert(RetVal.Val && "Illegal result number");
return RetVal;
}
// FALLTHROUGH if the target thinks it is legal.