[all-commits] [llvm/llvm-project] 77133c: [X86][AVX] Attempt to fold PACK(SHUFFLE(X, Y), SHUFF...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jul 10 01:34:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 77133cc1e2c91678082d2098b959757e72dfce60
      https://github.com/llvm/llvm-project/commit/77133cc1e2c91678082d2098b959757e72dfce60
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-07-10 (Fri, 10 Jul 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/avg.ll
    M llvm/test/CodeGen/X86/bitcast-and-setcc-512.ll
    M llvm/test/CodeGen/X86/packss.ll
    M llvm/test/CodeGen/X86/vector-compare-results.ll
    M llvm/test/CodeGen/X86/vector-pack-256.ll

  Log Message:
  -----------
  [X86][AVX] Attempt to fold PACK(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(PACK(X,Y)).

Truncations lowered as shuffles of multiple (concatenated) vectors often leave us with lane-crossing shuffles that feed a PACKSS/PACKUS, if both shuffles are fed from the same 2 vector sources, then we can PACK the sources directly and shuffle the result instead.

This is currently limited to whole i128 lanes in a 256-bit vector, but we can extend this if the need arises (but I'm not seeing many examples in real world code).




More information about the All-commits mailing list