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

llvm-svn: 23694
This commit is contained in:
Chris Lattner 2005-10-11 17:56:34 +00:00
parent c38fb8e2a1
commit 514f058be1
1 changed files with 1 additions and 1 deletions

View File

@ -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;