Index: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp =================================================================== --- llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp @@ -846,6 +846,7 @@ JT = Function::Create(FT, Function::InternalLinkage, "branch_funnel", &M); } JT->addAttribute(1, Attribute::Nest); + JT->addFnAttr(llvm::Attribute::NoInline); std::vector JTArgs; JTArgs.push_back(JT->arg_begin()); Index: llvm/test/Transforms/WholeProgramDevirt/branch-funnel.ll =================================================================== --- llvm/test/Transforms/WholeProgramDevirt/branch-funnel.ll +++ llvm/test/Transforms/WholeProgramDevirt/branch-funnel.ll @@ -140,7 +140,7 @@ ; CHECK: define internal void @branch_funnel(i8* nest, ...) -; CHECK: define hidden void @__typeid_typeid1_0_branch_funnel(i8* nest, ...) +; CHECK: define hidden void @__typeid_typeid1_0_branch_funnel(i8* nest, ...) [[INLINE:#[0-3]+]] ; CHECK-NEXT: call void (...) @llvm.icall.branch.funnel(i8* %0, i8* bitcast ([1 x i8*]* @vt1_1 to i8*), i32 (i8*, i32)* @vf1_1, i8* bitcast ([1 x i8*]* @vt1_2 to i8*), i32 (i8*, i32)* @vf1_2, ...) declare i1 @llvm.type.test(i8*, metadata) @@ -153,3 +153,4 @@ !4 = distinct !{} attributes #0 = { "target-features"="+retpoline" } +; CHECK: attributes [[INLINE]] = { noinline }