From: Chris Lattner Date: Wed, 13 Apr 2005 20:06:29 +0000 (+0000) Subject: fix an infinite loop X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=97e001dec7d8972c2734ea63ca020d9136172ba0;p=oota-llvm.git fix an infinite loop git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21289 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 64774c2fe41..0a4b88ba6d4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -795,7 +795,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, // If we are anding the result of a setcc, and we know setcc always // returns 0 or 1, simplify the RHS to either be 0 or 1 - if (N1.getOpcode() == ISD::SETCC && + if (N1.getOpcode() == ISD::SETCC && C2 != 1 && TLI.getSetCCResultContents() == TargetLowering::ZeroOrOneSetCCResult) if (C2 & 1) return getNode(ISD::AND, VT, N1, getConstant(1, VT));