From 97e001dec7d8972c2734ea63ca020d9136172ba0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 13 Apr 2005 20:06:29 +0000 Subject: [PATCH] fix an infinite loop git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21289 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.34.1