summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-11 17:56:34 +0000
committerChris Lattner <sabre@nondot.org>2005-10-11 17:56:34 +0000
commit514f058be1af63f023673aed67a9139c21955029 (patch)
tree4078125948d467912a9a26e7e2417cb3bd7a7a1a /llvm
parentc38fb8e2a1afc9cd0946a2729c7889e1480f1c26 (diff)
downloadbcm5719-llvm-514f058be1af63f023673aed67a9139c21955029.tar.gz
bcm5719-llvm-514f058be1af63f023673aed67a9139c21955029.zip
Fix a powerpc crash on CodeGen/Generic/llvm-ct-intrinsics.ll
llvm-svn: 23694
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0098a56a9a2..db9af8ac518 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -724,7 +724,7 @@ SDOperand DAGCombiner::visitAND(SDNode *N) {
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;
OpenPOWER on IntegriCloud