1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

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 e6fcb88ad1
commit 21c3cf756f

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;