[IC] Turn non-null MD on pointer loads to range MD on integer loads.
[oota-llvm.git] / lib / CodeGen / Analysis.cpp
index 2e8af9eb00482505223b304767a426985ef3f3b7..e50b846ddd8c385501b075e305405db98676bb38 100644 (file)
@@ -518,8 +518,9 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM) {
         return false;
     }
 
+  const Function *F = ExitBB->getParent();
   return returnTypeIsEligibleForTailCall(
-      ExitBB->getParent(), I, Ret, *TM.getSubtargetImpl()->getTargetLowering());
+      F, I, Ret, *TM.getSubtargetImpl(*F)->getTargetLowering());
 }
 
 bool llvm::returnTypeIsEligibleForTailCall(const Function *F,