[llvm] r345395 - [X86][SSE] Move 2-input limit up from getFauxShuffleMask to resolveTargetShuffleInputs

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 27 01:31:00 PDT 2018


I've reverted this at rL345451 - but if you can send me an example of a 
failing test (was it an assert or bad codegen?) that'd be great - my own 
fuzz tests haven't found anything and I need to fix this to support 
combining shuffle with subvectors.

On 26/10/2018 21:50, Eric Christopher wrote:
> Hi Simon,
>
> I'm working on why at the moment, but I am seeing some failures due to 
> this patch. I think you were meaning to make it NFC, but that part 
> didn't happen :)
>
> -eric
>
> On Fri, Oct 26, 2018 at 8:21 AM Simon Pilgrim via llvm-commits 
> <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>
>     Author: rksimon
>     Date: Fri Oct 26 08:19:02 2018
>     New Revision: 345395
>
>     URL: http://llvm.org/viewvc/llvm-project?rev=345395&view=rev
>     Log:
>     [X86][SSE] Move 2-input limit up from getFauxShuffleMask to
>     resolveTargetShuffleInputs
>
>     Makes no difference to actual shuffle decoding yet, but merges all
>     the existing limits in one place for when proper support is fixed.
>
>     Modified:
>         llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>
>     Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=345395&r1=345394&r2=345395&view=diff
>     ==============================================================================
>     --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
>     +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Oct 26
>     08:19:02 2018
>     @@ -6325,9 +6325,6 @@ static bool getFauxShuffleMask(SDValue N
>          if (!resolveTargetShuffleInputs(N0, SrcInputs0, SrcMask0, DAG) ||
>              !resolveTargetShuffleInputs(N1, SrcInputs1, SrcMask1, DAG))
>            return false;
>     -    // TODO - Add support for more than 2 inputs.
>     -    if ((SrcInputs0.size() + SrcInputs1.size()) > 2)
>     -      return false;
>          int MaskSize = std::max(SrcMask0.size(), SrcMask1.size());
>          SmallVector<int, 64> Mask0, Mask1;
>          scaleShuffleMask<int>(MaskSize / SrcMask0.size(), SrcMask0,
>     Mask0);
>     @@ -6387,8 +6384,7 @@ static bool getFauxShuffleMask(SDValue N
>              Mask[i + InsertIdx] = (NumElts * (1 + InputIdx)) +
>     ExtractIdx + M;
>            }
>          }
>     -    // TODO - Add support for more than 1 subinput.
>     -    return Ops.size() <= 2;
>     +    return true;
>        }
>        case ISD::SCALAR_TO_VECTOR: {
>          // Match against a scalar_to_vector of an extract from a vector,
>     @@ -6581,7 +6577,7 @@ static bool resolveTargetShuffleInputs(S
>            return false;
>
>        resolveTargetShuffleInputsAndMask(Inputs, Mask);
>     -  return true;
>     +  return Inputs.size() <= 2;
>      }
>
>      /// Returns the scalar element that will make up the ith
>
>
>     _______________________________________________
>     llvm-commits mailing list
>     llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181027/019115e7/attachment.html>


More information about the llvm-commits mailing list