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

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 11 10:56:46 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.31 -> 1.32
---
Log message:

Fix a powerpc crash on CodeGen/Generic/llvm-ct-intrinsics.ll


---
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.31 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.32
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.31	Tue Oct 11 01:07:15 2005
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Tue Oct 11 12:56:34 2005
@@ -724,7 +724,7 @@
       return DAG.getNode(ISD::AND, VT, N0.getOperand(0), N1);
   }
   // fold (and (or x, 0xFFFF), 0xFF) -> 0xFF
-  if (N0.getOpcode() == ISD::OR)
+  if (N0.getOpcode() == ISD::OR && N1C)
     if (ConstantSDNode *ORI = dyn_cast<ConstantSDNode>(N0.getOperand(1)))
       if ((ORI->getValue() & N1C->getValue()) == N1C->getValue())
         return N1;






More information about the llvm-commits mailing list