diff options
author | Tim Northover <tnorthover@apple.com> | 2014-05-24 19:45:41 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-05-24 19:45:41 +0000 |
commit | 0fc41252ba5efc2ee5ed52bcbd9bd29561714220 (patch) | |
tree | afb32e6ad6bfcd9dd58f3900ddf3896947af7501 | |
parent | c734d38c7cfc98f50ffd4408bc4fba1d7d743c3b (diff) | |
download | llvm-0fc41252ba5efc2ee5ed52bcbd9bd29561714220.tar.gz llvm-0fc41252ba5efc2ee5ed52bcbd9bd29561714220.tar.bz2 llvm-0fc41252ba5efc2ee5ed52bcbd9bd29561714220.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209585 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/AArch64/AArch64FastISel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/AArch64/AArch64FastISel.cpp b/lib/Target/AArch64/AArch64FastISel.cpp index 58178b1a48..8cc0f8a273 100644 --- a/lib/Target/AArch64/AArch64FastISel.cpp +++ b/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; |