[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Apr 13 13:06:42 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.80 -> 1.81
---
Log message:

fix an infinite loop


---
Diffs of the changes:  (+1 -1)

 SelectionDAG.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.80 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.81
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.80	Wed Apr 13 14:53:40 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Wed Apr 13 15:06:29 2005
@@ -795,7 +795,7 @@
 
       // 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));






More information about the llvm-commits mailing list