[all-commits] [llvm/llvm-project] efe59d: [X86][SSE] lowerShuffleWithPACK - extend to use ch...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Mar 31 06:52:34 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: efe59d6717dcdf7777acb9b7a734e1a520bdf22a
      https://github.com/llvm/llvm-project/commit/efe59d6717dcdf7777acb9b7a734e1a520bdf22a
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-03-31 (Tue, 31 Mar 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/avx-fp2int.ll
    M llvm/test/CodeGen/X86/bitcast-and-setcc-512.ll
    M llvm/test/CodeGen/X86/masked_store_trunc_ssat.ll
    M llvm/test/CodeGen/X86/masked_store_trunc_usat.ll
    M llvm/test/CodeGen/X86/psubus.ll
    M llvm/test/CodeGen/X86/vec-strict-fptoint-128.ll
    M llvm/test/CodeGen/X86/vec-strict-fptoint-256.ll
    M llvm/test/CodeGen/X86/vec_cast2.ll
    M llvm/test/CodeGen/X86/vector-trunc-packus.ll
    M llvm/test/CodeGen/X86/vector-trunc-ssat.ll
    M llvm/test/CodeGen/X86/vector-trunc-usat.ll

  Log Message:
  -----------
  [X86][SSE] lowerShuffleWithPACK - extend to use chained PACKs for larger truncations

If canLowerByDroppingEvenElements indicates that the shuffle is a N:1 compaction pattern and the inputs are suitably sign/zero extended then we can use a chain of PACKSS/PACKUS to compact.

This helps avoid PSHUFB (and its mask load) for short shuffle chains, shuffle combining will still replace with a PSHUFB if we have enough shuffles as getFauxShuffleMask can recognise PACKSS/PACKUS chains.




More information about the All-commits mailing list