Fix this logic.

llvm-svn: 23756
This commit is contained in:
Chris Lattner 2005-10-15 22:35:40 +00:00
parent 17cc9edd33
commit e540800d5a
1 changed files with 1 additions and 1 deletions

View File

@ -808,7 +808,7 @@ SDOperand DAGCombiner::visitAND(SDNode *N) {
if (ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
// If the RHS of the AND has zeros where the sign bits of the SRA will
// land, turn the SRA into an SRL.
if (MaskedValueIsZero(N1, (~0ULL << N01C->getValue()) &
if (MaskedValueIsZero(N1, (~0ULL << (OpSizeInBits-N01C->getValue())) &
(~0ULL>>(64-OpSizeInBits)), TLI)) {
WorkList.push_back(N);
CombineTo(N0.Val, DAG.getNode(ISD::SRL, VT, N0.getOperand(0),