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

Chris Lattner sabre at nondot.org
Fri Nov 10 13:37:29 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.248 -> 1.249
---
Log message:

Fix a dag combiner bug exposed by my recent instcombine patch.  This fixes
CodeGen/Generic/2006-11-10-DAGCombineMiscompile.ll and PPC gsm/toast



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

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


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.248 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.249
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.248	Fri Nov 10 02:28:11 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Fri Nov 10 15:37:15 2006
@@ -1723,7 +1723,7 @@
     abort();
   }
   // fold !(x or y) -> (!x and !y) iff x or y are setcc
-  if (N1C && N1C->getValue() == 1 && 
+  if (N1C && N1C->getValue() == 1 && VT == MVT::i1 &&
       (N0.getOpcode() == ISD::OR || N0.getOpcode() == ISD::AND)) {
     SDOperand LHS = N0.getOperand(0), RHS = N0.getOperand(1);
     if (isOneUseSetCC(RHS) || isOneUseSetCC(LHS)) {






More information about the llvm-commits mailing list