[all-commits] [llvm/llvm-project] 888049: [X86][SSE] Fold vselect(pshufb, pshufb) -> or(pshuf...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Sep 2 09:01:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 888049b97a7495ba669020522bcae6691287bd9a
      https://github.com/llvm/llvm-project/commit/888049b97a7495ba669020522bcae6691287bd9a
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vector-shuffle-256-v16.ll
    M llvm/test/CodeGen/X86/vector-shuffle-256-v32.ll
    M llvm/test/CodeGen/X86/vector-shuffle-combining.ll

  Log Message:
  -----------
  [X86][SSE] Fold vselect(pshufb,pshufb) -> or(pshufb,pshufb)

If the PSHUFBs have no other uses, then we can force the unselected elements to zero to OR them instead, avoiding both an extra mask load and a costly variable blend.

Eventually we should try to bring this into shuffle combining, once we can more easily convert between shuffles + select patterns.




More information about the All-commits mailing list