[PATCH] D73744: [SCEV] SCEVExpander::isHighCostExpansionHelper(): cost-model min/max (PR44668)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 14:02:27 PST 2020
lebedev.ri created this revision.
lebedev.ri added reviewers: reames, mkazantsev, wmi, sanjoy.
lebedev.ri added a project: LLVM.
Herald added subscribers: javed.absar, hiraditya.
lebedev.ri added a parent revision: D73741: [SCEV] SCEVExpander::isHighCostExpansionHelper(): cost-model polynomial recurrence.
Previosly we simply always said that `SCEVMinMaxExpr` is too costly to expand.
But this isn't really true, it expands into just a comparison+swap pair.
And again much like with add/mul, there will be one less such pair
than the number of operands. And we need to count the cost of operands themselves.
This does change a number of testcases, and as far as i can tell,
all of these changes are improvements, in the sense that
we fixed up more latches to do the [in]equality comparison.
This concludes cost-modelling changes, no other SCEV expressions exist as of now.
This is a part of addressing PR44668 <https://bugs.llvm.org/show_bug.cgi?id=44668>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73744
Files:
llvm/lib/Analysis/ScalarEvolutionExpander.cpp
llvm/test/Transforms/IndVarSimplify/elim-extend.ll
llvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
llvm/test/Transforms/IndVarSimplify/eliminate-trunc.ll
llvm/test/Transforms/IndVarSimplify/full_widening.ll
llvm/test/Transforms/IndVarSimplify/iv-widen.ll
llvm/test/Transforms/IndVarSimplify/lftr-multi-exit.ll
llvm/test/Transforms/IndVarSimplify/lftr-reuse.ll
llvm/test/Transforms/IndVarSimplify/loop-invariant-conditions.ll
llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73744.241578.patch
Type: text/x-patch
Size: 42578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200130/fc786130/attachment.bin>
More information about the llvm-commits
mailing list