[PATCH] D34601: [X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.

David Kreitzer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 06:48:50 PDT 2017


DavidKreitzer added a comment.

In https://reviews.llvm.org/D34601#810757, @m_zuckerman wrote:

> In https://reviews.llvm.org/D34601#808867, @DavidKreitzer wrote:
>
> > Hi Michael, I have one small additional comment. Otherwise, this looks good.
>
>
> This the error I am getting when I try to define the function with a default parameter. 
>  void llvm::scaleShuffleMask(int,llvm::ArrayRef<T>,llvm::SmallVectorImpl<T> &)': could **not deduce template argument** for 'llvm::ArrayRef<T>' from 'llvm::SmallVector<int,4>'
>
> If you prefer not to touch the CPP file. We can define an overload function in the header file that will explicit set the function signature.
>
> The function in the header will look like:
>
>   template <typename t1, unsigned n>
>   void scaleshufflemask(int scale, typename smallvector<t1, n> mask,
>     typename smallvectorimpl<t1> &scaledmask) {
>     scaleshufflemask(scale, makearrayref(mask), scaledmask);
>   
>
> This function describe another signature that one of the call in the CPP file uses.
>
> The other option is as  I proposed on this review.
>
> What you prefer?


I am not a fan of either of those options. How about getting rid of the template argument altogether and just use "int"? That is what ShuffleVectorInstruction::getShuffleMask uses, so it seems like it should be good enough here too. If you take this approach, it would be good to modify transpose_4x4 to use "int" instead of "uint32_t" for consistency.


https://reviews.llvm.org/D34601





More information about the llvm-commits mailing list