mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 23:29:20 +00:00
Don't use __bzero for memset if the second argument isn't zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
68d599df37
commit
38c92263eb
@ -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…
x
Reference in New Issue
Block a user