summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM64/ARM64Subtarget.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64Subtarget.cpp b/llvm/lib/Target/ARM64/ARM64Subtarget.cpp
index 62a489fd86f..528cfc97cbf 100644
--- a/llvm/lib/Target/ARM64/ARM64Subtarget.cpp
+++ b/llvm/lib/Target/ARM64/ARM64Subtarget.cpp
@@ -90,8 +90,11 @@ ARM64Subtarget::ClassifyGlobalReference(const GlobalValue *GV,
/// memset with zero passed as the second argument. Otherwise it
/// returns null.
const char *ARM64Subtarget::getBZeroEntry() const {
- // At the moment, always prefer bzero.
- return "bzero";
+ // Prefer bzero on Darwin only.
+ if(isTargetDarwin())
+ return "bzero";
+
+ return nullptr;
}
void ARM64Subtarget::overrideSchedPolicy(MachineSchedPolicy &Policy,
OpenPOWER on IntegriCloud