aeubanks added a comment. looks like opt registers its own TargetLibraryAnalysis but that doesn't count as running it, so getCachedResult returns null Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91476/new/ https://reviews.llvm.org/D91476