Index: lib/Target/PowerPC/PPCISelLowering.cpp =================================================================== --- lib/Target/PowerPC/PPCISelLowering.cpp +++ lib/Target/PowerPC/PPCISelLowering.cpp @@ -4719,7 +4719,8 @@ if (auto *G = dyn_cast(Callee)) GV = G->getGlobal(); bool Local = TM.shouldAssumeDSOLocal(*Mod, GV); - bool UsePlt = !Local && Subtarget.isTargetELF() && !isPPC64; + bool UsePlt = !Local && Subtarget.isTargetELF() && !isPPC64 && + DAG.getTarget().getRelocationModel() != Reloc::Static; if (isFunctionGlobalAddress(Callee)) { GlobalAddressSDNode *G = cast(Callee); Index: test/CodeGen/PowerPC/ppc32-static.ll =================================================================== --- test/CodeGen/PowerPC/ppc32-static.ll +++ test/CodeGen/PowerPC/ppc32-static.ll @@ -0,0 +1,13 @@ +; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -relocation-model=static | FileCheck --match-full-lines %s + +declare i32 @call_foo(i32, ...) + +define i32 @foo() { +entry: + %call = call i32 (i32, ...) @call_foo(i32 0, i32 1) + ret i32 0 +} + +; LABEL:foo: +; CHECK-NOT: bl call_foo@PLT +; CHECK: bl call_foo