Direct calls only for arm fast isel for now.
[oota-llvm.git] / lib / Target / ARM / ARMFastISel.cpp
index 9c35d0a2b4cfdb085a246bc057e01f4d64a56527..2d38aff416efc1aafcdb7cd9fcd70741d3afd0b5 100644 (file)
@@ -1291,9 +1291,10 @@ bool ARMFastISel::SelectCall(const Instruction *I) {
   // Can't handle inline asm or worry about intrinsics yet.
   if (isa<InlineAsm>(Callee) || isa<IntrinsicInst>(CI)) return false;
 
-  // Only handle global variable Callees
+  // Only handle global variable Callees that are direct calls.
   const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
-  if (!GV) return false;
+  if (!GV || Subtarget->GVIsIndirectSymbol(GV, TM.getRelocationModel()))
+    return false;
   
   // Check the calling convention.
   ImmutableCallSite CS(CI);