================
@@ -1126,13 +1130,23 @@ PreservedAnalyses ExpandFpPass::run(Function &F, 
FunctionAnalysisManager &FAM) {
   AssumptionCache *AC = nullptr;
   if (OptLevel != CodeGenOptLevel::None)
     AC = &FAM.getResult<AssumptionAnalysis>(F);
+
+  auto &MAMProxy = FAM.getResult<ModuleAnalysisManagerFunctionProxy>(F);
+  const RTLIB::RuntimeLibcallsInfo *Libcalls =
+      MAMProxy.getCachedResult<RuntimeLibraryAnalysis>(*F.getParent());
+  if (!Libcalls) {
+    F.getContext().emitError("'runtime-libcall-info' analysis required");
----------------
frederik-h wrote:

You cannot assert `Libcalls` here. If nothing runs the analysis before this 
point, the result will be null. That's why the explicit `require` in the pass 
pipeline in the tests is necessary.

https://github.com/llvm/llvm-project/pull/165197
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to