[llvm] r209585 - AArch64: disable FastISel for large code model.

Tim Northover tnorthover at apple.com
Sat May 24 12:45:42 PDT 2014


Author: tnorthover
Date: Sat May 24 14:45:41 2014
New Revision: 209585

URL: http://llvm.org/viewvc/llvm-project?rev=209585&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp?rev=209585&r1=209584&r2=209585&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp Sat May 24 14:45:41 2014
@@ -247,6 +247,11 @@ unsigned AArch64FastISel::AArch64Materia
   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;





More information about the llvm-commits mailing list