From: Stuart Hastings Date: Fri, 13 May 2011 00:15:17 +0000 (+0000) Subject: Revert 131266 and 131261 due to buildbot complaints. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8ad145d7299dbeb8b816ce0549d9323630bbae1a;p=oota-llvm.git Revert 131266 and 131261 due to buildbot complaints. rdar://problem/9298790 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131269 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 5a833d335c1..e2e6691ba7c 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3535,16 +3535,9 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node, Tmp2.getOperand(0), Tmp2.getOperand(1), Node->getOperand(2)); } else { - // We test only the i1 bit. Skip the AND if UNDEF. - Tmp3 = (Tmp2.getOpcode() == ISD::UNDEF || - (Tmp2.getOpcode() == ISD::AND && - Tmp2.getConstantOperandVal(1) == 1)) ? - Tmp2 : - DAG.getNode(ISD::AND, dl, Tmp2.getValueType(), Tmp2, - DAG.getConstant(1, Tmp2.getValueType())); Tmp1 = DAG.getNode(ISD::BR_CC, dl, MVT::Other, Tmp1, - DAG.getCondCode(ISD::SETNE), Tmp3, - DAG.getConstant(0, Tmp3.getValueType()), + DAG.getCondCode(ISD::SETNE), Tmp2, + DAG.getConstant(0, Tmp2.getValueType()), Node->getOperand(2)); } Results.push_back(Tmp1); diff --git a/test/CodeGen/Thumb2/thumb2-cbnz.ll b/test/CodeGen/Thumb2/thumb2-cbnz.ll index 0992fa8be34..10a4985d173 100644 --- a/test/CodeGen/Thumb2/thumb2-cbnz.ll +++ b/test/CodeGen/Thumb2/thumb2-cbnz.ll @@ -3,29 +3,26 @@ declare double @floor(double) nounwind readnone -define void @t(i32 %c, double %b) { +define void @t(i1 %a, double %b) { entry: - %cmp1 = icmp ne i32 %c, 0 - br i1 %cmp1, label %bb3, label %bb1 + br i1 %a, label %bb3, label %bb1 bb1: ; preds = %entry unreachable bb3: ; preds = %entry - %cmp2 = icmp ne i32 %c, 0 - br i1 %cmp2, label %bb7, label %bb5 + br i1 %a, label %bb7, label %bb5 bb5: ; preds = %bb3 unreachable bb7: ; preds = %bb3 - %cmp3 = icmp ne i32 %c, 0 - br i1 %cmp3, label %bb11, label %bb9 + br i1 %a, label %bb11, label %bb9 bb9: ; preds = %bb7 -; CHECK: cmp r0, #0 -; CHECK: cmp r0, #0 -; CHECK-NEXT: cbnz +; CHECK: cmp r0, #0 +; CHECK: cmp r0, #0 +; CHECK-NEXT: cbnz %0 = tail call double @floor(double %b) nounwind readnone ; [#uses=0] br label %bb11