[PATCH] D98512: [LoopVectorize] Simplify scalar cost calculation in getInstructionCost
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 04:20:00 PDT 2021
fhahn added a comment.
In D98512#2625701 <https://reviews.llvm.org/D98512#2625701>, @david-arm wrote:
> It looks like the only change is the IV update which goes from 4 -> 1. I think the adds you mentioned are included as part of the load/store cost.
I am not sure. From a quick look at the code, it seems like the high load/store cost comes mostly from the required scalarization of the stored/loaded values and the cost of the extra increments seems not fully included at least on the IR instruction level. Unfortunately I don't think there's really any different option to write a test that hits the code paths in the patch, even if the scalarized values are used in other places later on. So it's probably not worth worrying too much about it. I still think we should at least have an assertion as mentioned above, to catch the gap if the cost-modeling is improved.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98512/new/
https://reviews.llvm.org/D98512
More information about the llvm-commits
mailing list