From a179ab3016a08051c34ba82d7feaeb4198702a60 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 11 Oct 2005 17:56:34 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 0098a56a9a2..db9af8ac518 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(N0.getOperand(1))) if ((ORI->getValue() & N1C->getValue()) == N1C->getValue()) return N1; -- 2.34.1