forked from OSchip/llvm-project
Don't use __bzero for memset if the second argument isn't zero.
llvm-svn: 49050
This commit is contained in:
parent
bf1a7c6440
commit
cb9f8f6e4e
|
@ -4562,8 +4562,9 @@ SDOperand X86TargetLowering::LowerMEMSET(SDOperand Op, SelectionDAG &DAG) {
|
|||
(I && I->getValue() > Subtarget->getMaxInlineSizeThreshold())) {
|
||||
|
||||
// Check to see if there is a specialized entry-point for memory zeroing.
|
||||
const char *bzeroEntry = Subtarget->getBZeroEntry();
|
||||
ConstantSDNode *V = dyn_cast<ConstantSDNode>(Op.getOperand(2));
|
||||
const char *bzeroEntry =
|
||||
V && V->isNullValue() ? Subtarget->getBZeroEntry() : 0;
|
||||
|
||||
MVT::ValueType IntPtr = getPointerTy();
|
||||
const Type *IntPtrTy = getTargetData()->getIntPtrType();
|
||||
|
|
Loading…
Reference in New Issue