[PATCH] D42981: [COST] Fix cost model of load instructions on X86
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 13:30:58 PST 2018
spatel added a comment.
In https://reviews.llvm.org/D42981#1001109, @ABataev wrote:
> In https://reviews.llvm.org/D42981#1001063, @spatel wrote:
>
> > The patch is doing what I hoped for on PR36280, but I don't understand the reasoning.
> >
> > A folded load is not actually free on any x86 CPU AFAIK. It always has an extra uop, and that uop is handled on a different port / execution unit than the math op. The cost model that we're using here is based on throughput rates (let me know if I'm wrong), so I don't see how any load could be free.
>
>
> This cost is already the part of the cost of the arithmetic instructions and we count this cost one more time when we try to estimate the cost of standalone load instructions.
I need some help to understand this. Is SLP double-counting the cost of load instructions? If so, why? If you could explain exactly what is happening in the PR36280 test, that would be good for me.
Repository:
rL LLVM
https://reviews.llvm.org/D42981
More information about the llvm-commits
mailing list