X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FSelectionDAG%2FLegalizeDAG.cpp;h=faebbdcfafb30a586d4a3d04f7d12d7794598450;hb=722cb360690e5d7742b01a9f497fdb65bf8079d5;hp=1808dacc2b54ad6a847d0987a9e49487ef687c0f;hpb=fc04e5ead38ee6dbce6996efbec9298a01416a38;p=oota-llvm.git diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 1808dacc2b5..faebbdcfafb 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1360,14 +1360,13 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { // Ensure that libcalls are emitted before a branch. Tmp1 = DAG.getNode(ISD::TokenFactor, MVT::Other, Tmp1, LastCALLSEQ_END); Tmp1 = LegalizeOp(Tmp1); - LastCALLSEQ_END = DAG.getEntryNode(); - Tmp2 = Node->getOperand(2); // LHS Tmp3 = Node->getOperand(3); // RHS Tmp4 = Node->getOperand(1); // CC LegalizeSetCCOperands(Tmp2, Tmp3, Tmp4); - + LastCALLSEQ_END = DAG.getEntryNode(); + // If we didn't get both a LHS and RHS back from LegalizeSetCCOperands, // the LHS is a legal SETCC itself. In this case, we need to compare // the result against zero to select between true and false values.