[PATCH] D103799: [CostModel] Express cost(urem) as cost(div+mul+sub) when set to Expand.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 6 09:32:47 PDT 2021
RKSimon added a comment.
In D103799#2860104 <https://reviews.llvm.org/D103799#2860104>, @sdesmalen wrote:
> I had another look at the costs for X86.
>
> ....
>
> The options are to:
>
> 1. Tweak this number '20' to keep the cost similar to what they are now (that would require special-casing the code in X86TTI for UREM/SREM, since the condition is currently bundled with SDIV/UDIV).
> 2. Leave it as-is, since the values are already largely arbitrary an arbitrary number and the higher number satisfies the goal of preventing vectorization of division.
>
> Does anyone have a suggestion and/or preference?
This is actually on my backlog - now that we've improved scalarization costs on x86 I'm hoping to add more realistic scalar div/rem costs instead of relying on this kludge. So I'm happy with (2) for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103799/new/
https://reviews.llvm.org/D103799
More information about the llvm-commits
mailing list