[PATCH] D79162: [Analysis] TTI: Add CastContextHint for getCastInstrCost

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 09:41:48 PDT 2020


dmgreen added a comment.

In D79162#2020222 <https://reviews.llvm.org/D79162#2020222>, @Pierre-vh wrote:

> If I understand correctly, I should:
>
> - Use {None, Normal, Masked, Interleaved and Gather} instead of the current enum values. (No Scatter? e.g. for trunc to scatter store? Do I need the "reversed" one as well?)
> - Only set `CastContextHint` for zext, sext and trunc.
>
>   Is that correct? If yes, I can give it a go and we'll see how it looks.


I think the vectorizer calls it GatherScatter. That sounds like a good thing to mirror.

Reverse end up as extend(reverseshuffle(load))), and it doesn't look like the extend will usually get pushed through the shuffle. You could either make it a None or add and extra Reverse option for completeness. Either way, it should probably not be free by default.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79162





More information about the llvm-commits mailing list