[PATCH] D126043: [LSR] Drop LSR solution if it is less profitable than baseline
Yueh-Ting (eop) Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 19:43:58 PDT 2022
eopXD added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:3372
+ F.initialMatch(S, L, SE);
+ if (!BaselineCost.isLoser())
+ BaselineCost.RateFormula(F, Regs, VisitedRegs, LU);
----------------
Meinersbur wrote:
> How can the baseline immediately become the loser?
I have encounter cases that the `BaselineCost` is updated to loser when compiling spec2k6 benchmarks. This if-statement is used for us to prevent assertion errors as `RateFormula` assumes the cost to not be a loser when called.
I have a patch (D125670) that is pretty simple to free us from using this if-statement? I think its pretty simple and we can land it first?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126043/new/
https://reviews.llvm.org/D126043
More information about the llvm-commits
mailing list