[all-commits] [llvm/llvm-project] b7342e: [X86] Fold SHUFPS(shuffle(x), shuffle(y), mask) -> S...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Sep 19 12:58:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7342e3137d8fa7c356a80c1ddecf1d410c27eef
      https://github.com/llvm/llvm-project/commit/b7342e3137d8fa7c356a80c1ddecf1d410c27eef
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-09-19 (Sun, 19 Sep 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/horizontal-sum.ll
    M llvm/test/CodeGen/X86/vselect.ll

  Log Message:
  -----------
  [X86] Fold SHUFPS(shuffle(x),shuffle(y),mask) -> SHUFPS(x,y,mask')

We can combine unary shuffles into either of SHUFPS's inputs and adjust the shuffle mask accordingly.

Unlike general shuffle combining, we can be more aggressive and handle multiuse cases as we're not going to accidentally create additional shuffles.


  Commit: f855ef260148df0f08c73a70b9425a5215232874
      https://github.com/llvm/llvm-project/commit/f855ef260148df0f08c73a70b9425a5215232874
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-09-19 (Sun, 19 Sep 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ScheduleAtom.td
    M llvm/test/tools/llvm-mca/X86/Atom/resources-sse1.s
    M llvm/test/tools/llvm-mca/X86/Atom/resources-sse2.s
    M llvm/test/tools/llvm-mca/X86/Atom/resources-sse3.s
    M llvm/test/tools/llvm-mca/X86/Atom/resources-ssse3.s
    M llvm/test/tools/llvm-mca/X86/Atom/resources-x87.s

  Log Message:
  -----------
  [X86][Atom] Fix FP uops + port usage

Both ports are required in most cases. Update the uops counts + port usage based off the most recent llvm-exegesis captures (PR36895) and what Intel AoM / Agner / InstLatX64 reports as well.

Noticed while trying to improve fp costs for vectorization via the D103695 helper script.


Compare: https://github.com/llvm/llvm-project/compare/2ca637c9769f...f855ef260148


More information about the All-commits mailing list