aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-04-13 20:06:29 +0000
committerChris Lattner <sabre@nondot.org>2005-04-13 20:06:29 +0000
commit97e001dec7d8972c2734ea63ca020d9136172ba0 (patch)
treeaa71837c747008943abc6f704937a2fe9971cbfe /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentfd8d389edef29f6442cb4e32ee4b7ffe1d0c71d7 (diff)
fix an infinite loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21289 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 64774c2fe4..0a4b88ba6d 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));