[all-commits] [llvm/llvm-project] 52cb0b: [X86] LowerRotate - use vXi8 custom lowering for n...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Dec 15 06:52:25 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 52cb0bbec34fc9320ff8ec1cdd617ea90e56a5e1
      https://github.com/llvm/llvm-project/commit/52cb0bbec34fc9320ff8ec1cdd617ea90e56a5e1
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-12-15 (Wed, 15 Dec 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/min-legal-vector-width.ll
    M llvm/test/CodeGen/X86/srem-seteq-vec-nonsplat.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-128.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-256.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-512.ll
    M llvm/test/CodeGen/X86/vector-fshr-rot-128.ll
    M llvm/test/CodeGen/X86/vector-fshr-rot-256.ll
    M llvm/test/CodeGen/X86/vector-fshr-rot-512.ll
    M llvm/test/CodeGen/X86/vector-rotate-128.ll
    M llvm/test/CodeGen/X86/vector-rotate-256.ll
    M llvm/test/CodeGen/X86/vector-rotate-512.ll

  Log Message:
  -----------
  [X86] LowerRotate - use vXi8 custom lowering for non-uniform constant amounts

Instead of bailing and using the default expansion, we can more efficiently use the shl(unpack(x,x),unpack(amt,zero)) pattern for vXi8 rotl, as we'll then use vXi16 fast PMULLW (or PSLLVW).

This required some minor changes to improve constant folding during unpack shuffle creation and convertShiftLeftToScale to support constants that have already been lowered to constant pools.




More information about the All-commits mailing list