diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index 574d870bccd8c3..a7d7594c00b3f5 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -761,12 +761,6 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC, LazyCallGraph::Node &N = *CG.lookup(F); if (CG.lookupSCC(N) != C) continue; - if (!Calls[I].first->getCalledFunction()->hasFnAttribute( - Attribute::AlwaysInline) && - F.hasOptNone()) { - setInlineRemark(*Calls[I].first, "optnone attribute"); - continue; - } LLVM_DEBUG(dbgs() << "Inlining calls in: " << F.getName() << "\n");