[PATCH] D109388: [AArch64][CostModel] Use cost of target trunc type when only use of a non-register sized load

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 13:40:54 PDT 2021


AndrewLitteken added a comment.

In D109388#2992635 <https://reviews.llvm.org/D109388#2992635>, @dmgreen wrote:

> In general, you can't expect the costmodel to reverse-engineer every optimization that might happen in the llvm pipeline. There are too many to be sensibly captured and the IR needs to be at least somewhat representative of what the backend will see. I don't think there is anything before ISel that will split up a trunc of a load like this though.
>
> Do you plan to do this for all architectures?

Would it make more sense to have a check for this on the outliner side, and make a special call to `getMemoryOpCost` for load to trunc instructions then?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109388/new/

https://reviews.llvm.org/D109388



More information about the llvm-commits mailing list