[all-commits] [llvm/llvm-project] 592454: [X86][SSE] Add additional (f)add(shuffle(x, y), shuf...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Jul 28 04:59:21 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 592454c367dec9d3dd0abfb840cbaa664bc67bb8
      https://github.com/llvm/llvm-project/commit/592454c367dec9d3dd0abfb840cbaa664bc67bb8
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    A llvm/test/CodeGen/X86/haddsub-4.ll

  Log Message:
  -----------
  [X86][SSE] Add additional (f)add(shuffle(x,y),shuffle(x,y)) tests for D83789

(cherry picked from commit bfc4294ef61d5cf69fffe6b64287a323c003d90f)


  Commit: d6875948aaade1cd39e5d9b373d02749dd1e58f2
      https://github.com/llvm/llvm-project/commit/d6875948aaade1cd39e5d9b373d02749dd1e58f2
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/haddsub-3.ll
    M llvm/test/CodeGen/X86/haddsub-4.ll
    M llvm/test/CodeGen/X86/haddsub-shuf.ll
    M llvm/test/CodeGen/X86/haddsub-undef.ll
    M llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
    M llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll

  Log Message:
  -----------
  [X86][SSE] Attempt to match OP(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(HOP(X,Y))

An initial backend patch towards fixing the various poor HADD combines (PR34724, PR41813, PR45747 etc.).

This extends isHorizontalBinOp to check if we have per-element horizontal ops (odd+even element pairs), but not in the expected serial order - in which case we build a "post shuffle mask" that we can apply to the HOP result, assuming we have fast-hops/optsize etc.

The next step will be to extend the SHUFFLE(HOP(X,Y)) combines as suggested on PR41813 - accepting more post-shuffle masks even on slow-hop targets if we can fold it into another shuffle.

Differential Revision: https://reviews.llvm.org/D83789

(cherry picked from commit 182111777b4ec215eeebe8ab5cc2a324e2f055ff)


Compare: https://github.com/llvm/llvm-project/compare/e47a6a224a4b...d6875948aaad


More information about the All-commits mailing list