[PATCH] D73722: [SCEV] SCEVExpander::isHighCostExpansionHelper(): cost-model plain UDiv
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 21:14:43 PST 2020
mkazantsev accepted this revision.
mkazantsev added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll:24
+; CHECK-NEXT: [[TMP1:%.*]] = udiv i32 [[TMP0]], 12
+; CHECK-NEXT: [[TMP2:%.*]] = mul i32 [[TMP1]], 12
; CHECK-NEXT: br label [[WHILE_BODY:%.*]]
----------------
lebedev.ri wrote:
> mkazantsev wrote:
> > Why do we need this change if it starts generating worse code?
> We need this change because the goal of this patchset is to move
> the *entirety* of SCEVExpander::isHighCostExpansionHelper()
> to TTI cost-modelling. Entirety as in everything.
>
> Also, please do see the patch's description:
> > While that is the case, it is evident this is actually a regression
> > due to the fact that cost-modelling is incomplete - we did not account
> > for the add, mul costs yet. That is being addressed in D73728.
>
Ok it seems the next patch fixes it back. Thanks. :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73722/new/
https://reviews.llvm.org/D73722
More information about the llvm-commits
mailing list