mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
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
This commit is contained in:
parent
c734d38c7c
commit
0fc41252ba
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user