[APInt] Replace calls to setBits with more specific calls to setBitsFrom and setLowBits where possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301768 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2017-04-30 07:44:58 +00:00
parent 78c3b9ec3d
commit c07d5e69ae
2 changed files with 4 additions and 4 deletions

View File

@ -2516,7 +2516,7 @@ void SelectionDAG::computeKnownBits(SDValue Op, KnownBits &Known,
computeKnownBits(Op.getOperand(1), Known2, DemandedElts, Depth + 1);
KnownZeroLow = std::min(KnownZeroLow,
Known2.Zero.countTrailingOnes());
Known.Zero.setBits(0, KnownZeroLow);
Known.Zero.setLowBits(KnownZeroLow);
break;
}
case ISD::UADDO:

View File

@ -26701,11 +26701,11 @@ void X86TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
break;
LLVM_FALLTHROUGH;
case X86ISD::SETCC:
Known.Zero.setBits(1, BitWidth);
Known.Zero.setBitsFrom(1);
break;
case X86ISD::MOVMSK: {
unsigned NumLoBits = Op.getOperand(0).getValueType().getVectorNumElements();
Known.Zero.setBits(NumLoBits, BitWidth);
Known.Zero.setBitsFrom(NumLoBits);
break;
}
case X86ISD::VSHLI:
@ -26746,7 +26746,7 @@ void X86TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
DAG.computeKnownBits(N0, Known, DemandedSrcElts, Depth + 1);
Known.One = Known.One.zext(BitWidth);
Known.Zero = Known.Zero.zext(BitWidth);
Known.Zero.setBits(InBitWidth, BitWidth);
Known.Zero.setBitsFrom(InBitWidth);
break;
}
}