summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-05-24 19:45:41 +0000
committerTim Northover <tnorthover@apple.com>2014-05-24 19:45:41 +0000
commit391f93a55440e6cd90a0cf9c14a41059e3a0ca26 (patch)
tree6de048056548bdb00c80f256419ad31f632134ea /llvm/lib
parent7cd0df41bf20b56d2eda6585ef22896524fe5da7 (diff)
downloadbcm5719-llvm-391f93a55440e6cd90a0cf9c14a41059e3a0ca26.tar.gz
bcm5719-llvm-391f93a55440e6cd90a0cf9c14a41059e3a0ca26.zip
AArch64: disable FastISel for large code model.
The code emitted is what would be expected for the small model, so it shouldn't be used when objects can be the full 64-bits away. This fixes MCJIT tests on Linux. llvm-svn: 209585
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64FastISel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FastISel.cpp b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
index 58178b1a48b..8cc0f8a2735 100644
--- a/llvm/lib/Target/AArch64/AArch64FastISel.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
@@ -247,6 +247,11 @@ unsigned AArch64FastISel::AArch64MaterializeGV(const GlobalValue *GV) {
if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
TLSGV = GA->getAliasee();
+ // MachO still uses GOT for large code-model accesses, but ELF requires
+ // movz/movk sequences, which FastISel doesn't handle yet.
+ if (TM.getCodeModel() != CodeModel::Small && !Subtarget->isTargetMachO())
+ return 0;
+
if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(TLSGV))
if (GVar->isThreadLocal())
return 0;
OpenPOWER on IntegriCloud