projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68d599d
)
Don't use __bzero for memset if the second argument isn't zero.
author
Dan Gohman
<gohman@apple.com>
Tue, 1 Apr 2008 20:56:18 +0000
(20:56 +0000)
committer
Dan Gohman
<gohman@apple.com>
Tue, 1 Apr 2008 20:56:18 +0000
(20:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49050
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/X86ISelLowering.cpp
b/lib/Target/X86/X86ISelLowering.cpp
index f4ec6afd5406ff02cb92642b215a472bc5932daa..162979b8039a65b378eee99a1a8c0832badd2bc6 100644
(file)
--- a/
lib/Target/X86/X86ISelLowering.cpp
+++ b/
lib/Target/X86/X86ISelLowering.cpp
@@
-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();