[PATCH] D34160: [Power9] Exploit vinserth instruction

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 09:31:34 PDT 2017


inouehrs added a comment.

In https://reviews.llvm.org/D34160#781261, @gyiu wrote:

> In https://reviews.llvm.org/D34160#779972, @inouehrs wrote:
>
> > This patch (potentially) increase the number of vector instructions (permutation -> shift + insert). Is my understanding correct?
>
>
> Yep.  Though I think with a vperm you still need to load the mask into a vector register first, whereas with vshift + vinsert we're saving on the load.


I feel we should not increase the number of vector instructions within a loop (i.e. a common case for vector code) if we can load the mask into a vector register before the loop.
In case without an additional shift, it is nice to do opt in a loop for freeing up one vector register.


Repository:
  rL LLVM

https://reviews.llvm.org/D34160





More information about the llvm-commits mailing list