[PATCH] D143631: [LTO] Don't let InstCombine re-sink the vastly more expensive fdiv

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 11:54:20 PST 2023


craig.topper added a comment.

In D143631#4126901 <https://reviews.llvm.org/D143631#4126901>, @spatel wrote:

> In D143631#4126874 <https://reviews.llvm.org/D143631#4126874>, @craig.topper wrote:
>
>> Do you have a proposed refinement for D87479 <https://reviews.llvm.org/D87479>? Turns out `LI` is only used by InstCombine if its available already in the pipeline so I don't know if it's safe to use that instead of the basic block check.
>
> Yes, using LoopInfo was what I was thinking. I just made a rough draft of that, and it handles the motivating case here, and I think it would work on the other examples we've raised too. I can clean it up, test some more, and post it.

I don't think it it will work on the case I raised since IR LICM can't fix it so the damage will happen the first time InstCombine runs without LoopInfo. But I hope I'm wrong.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143631/new/

https://reviews.llvm.org/D143631



More information about the llvm-commits mailing list