https://bugs.llvm.org/show_bug.cgi?id=39368

            Bug ID: 39368
           Summary: Add EXTRACT/INSERT_SUBVECTOR support to
                    TTI::getShuffleCost
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedb...@nondot.org
          Reporter: llvm-...@redking.me.uk
                CC: a.bat...@hotmail.com, llvm-bugs@lists.llvm.org,
                    spatel+l...@rotateright.com

The default horizontal reduction costs depend on EXTRACT_SUBVECTOR shuffle
costs, but we barely have support for these in the TTIs.

Several issues need to be addressed:

1 - correct identification of EXTRACT/INSERT_SUBVECTOR shufflevector patterns
in ShuffleVectorInst - we've ignored length changing shuffles so far.

EXTRACT is easy, just look for an unary sequential shuffle (I don't think we
need it to be subvector aligned - just include it in the getShuffleCost index
argument).

INSERT is trickier as we need to determine what the size of the subvector was,
so we need to search the IR for the source.

2 - Fix use of Index and SubTy in getShuffleCost calls - AFAICT the Index
should indicate the extraction/insertion point of the subvector and SubTy
should always refer to the subvector type (and Ty should refer to the larger
vector type - which for EXTRACT isn't the destination type).

3 - Add SK_InsertSubvector/SK_ExtractSubvector support to
BasicTTIImpl::getShuffleCosts similar to getPermuteShuffleOverhead.

4 - Add SK_InsertSubvector/SK_ExtractSubvector support to targets - X86 in
particular as the XMM/YMM/ZMM instructions have the most use for them.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to