diff options
author | Chris Lattner <sabre@nondot.org> | 2005-10-11 17:56:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-10-11 17:56:34 +0000 |
commit | a179ab3016a08051c34ba82d7feaeb4198702a60 (patch) | |
tree | 6fdd1b9898005c40a6e823cea039980839cdd556 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 05b57433e68de3ba0f6eb01f4a0271fee3abeb09 (diff) |
Fix a powerpc crash on CodeGen/Generic/llvm-ct-intrinsics.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 0098a56a9a..db9af8ac51 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/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; |