[all-commits] [llvm/llvm-project] 3fe976: [X86] Fold ADD(VPMADDWD(X, Y), VPMADDWD(Z, W)) -> VPM...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Sep 26 10:16:57 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/madd.ll
    M llvm/test/CodeGen/X86/pmaddubsw.ll

  Log Message:
  -----------
  [X86] Fold ADD(VPMADDWD(X,Y),VPMADDWD(Z,W)) -> VPMADDWD(SHUFFLE(X,Z), SHUFFLE(Y,W))

Merge addition of VPMADDWD nodes if each element pair doesn't use the upper element in each pair (i.e. its zero) - we can generalize this to either element in the pair if we one day create VPMADDWD with zero lower elements.

There are still a number of issues with extending/shuffling with 256/512-bit VPMADDWD nodes so this initially only works for v2i32/v4i32 cases - I'm working on removing all these limitations but there's still a bit of yak shaving to go.....




More information about the All-commits mailing list