[PATCH] D73722: [SCEV] SCEVExpander::isHighCostExpansionHelper(): cost-model plain UDiv

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 19 01:20:10 PST 2020


lebedev.ri marked an inline comment as done.
lebedev.ri added a comment.

@mkazantsev thank you for taking a look!
Please see inline reply :)



================
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:%.*]]
----------------
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.



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