[PATCH] D87479: [InstCombine] Don't sink the fdiv from (fmul (fdiv 1.0, %x), %y) if the fdiv isn't in the same basic block as the fmul
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 06:40:24 PDT 2020
spatel added a comment.
In D87479#2267835 <https://reviews.llvm.org/D87479#2267835>, @spatel wrote:
> In D87479#2266829 <https://reviews.llvm.org/D87479#2266829>, @craig.topper wrote:
>
>> We don't seem to run LICM after InstCombine in the LTO pipeline if I'm reading the pass manager correctly.
>
> That seems like the root bug...although a 1st hack at changing that didn't result in any regression test fails in llvm/test/Other/* .
> If we are inverting this fdiv pattern, then aren't we doing that to all kinds of other loop invariant opportunities too?
Actually, we do have some coverage for the new pass manager at least. I got that to wiggle with:
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index bae84784628..acc937cb202 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -1576,6 +1576,9 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, bool DebugLogging,
MainFPM.addPass(InstCombinePass());
invokePeepholeEPCallbacks(MainFPM, Level);
MainFPM.addPass(JumpThreadingPass(/*InsertFreezeWhenUnfoldingSelect*/ true));
+ MainFPM.addPass(createFunctionToLoopPassAdaptor(
+ LICMPass(PTO.LicmMssaOptCap, PTO.LicmMssaNoAccForPromotionCap),
+ EnableMSSALoopDependency, DebugLogging));
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(MainFPM)));
// Create a function that performs CFI checks for cross-DSO calls with
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87479/new/
https://reviews.llvm.org/D87479
More information about the llvm-commits
mailing list