[all-commits] [llvm/llvm-project] b051c8: [SLP][NFC] This adds a test for a follow-up patch ...

vporpo via All-commits all-commits at lists.llvm.org
Thu Mar 17 18:06:33 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b051c836c0c8ca722ef5d58cee7fa589da43aa28
      https://github.com/llvm/llvm-project/commit/b051c836c0c8ca722ef5d58cee7fa589da43aa28
  Author: Vasileios Porpodas <vporpodas at google.com>
  Date:   2022-03-17 (Thu, 17 Mar 2022)

  Changed paths:
    M llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll
    M llvm/test/Transforms/SLPVectorizer/X86/operandorder.ll

  Log Message:
  -----------
  [SLP][NFC] This adds a test for a follow-up patch that fixes a look-ahead operand reordering issue

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


  Commit: 5efa78985bf5cbba1c4346ba41a16435fc516446
      https://github.com/llvm/llvm-project/commit/5efa78985bf5cbba1c4346ba41a16435fc516446
  Author: Vasileios Porpodas <vporpodas at google.com>
  Date:   2022-03-17 (Thu, 17 Mar 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.h
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll
    M llvm/test/Transforms/SLPVectorizer/X86/operandorder.ll

  Log Message:
  -----------
  [SLP] Fix lookahead operand reordering for splat loads.

Splat loads are inexpensive in X86. For a 2-lane vector we need just one
instruction: `movddup (%reg), xmm0`. Using the standard Splat score leads
to worse code. This patch adds a new score dedicated for splat loads.

Please note that a splat is usually three IR instructions:
- It is usually a load and 2 inserts:
 %ld = load double, double* %gep
 %ins1 = insertelement <2 x double> poison, double %ld, i32 0
 %ins2 = insertelement <2 x double> %ins1, double %ld, i32 1

- But it can also be a load, an insert and a shuffle:
 %ld = load double, double* %gep
 %ins = insertelement <2 x double> poison, double %ld, i32 0
 %shf = shufflevector <2 x double> %ins, <2 x double> poison, <2 x i32> zeroinitializer

Because of this some of the lit tests contain more IR instructions.

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


  Commit: 511fa0800f8a0ff6db72558c2aaf808cb03f9595
      https://github.com/llvm/llvm-project/commit/511fa0800f8a0ff6db72558c2aaf808cb03f9595
  Author: Vasileios Porpodas <vporpodas at google.com>
  Date:   2022-03-17 (Thu, 17 Mar 2022)

  Changed paths:
    M llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll

  Log Message:
  -----------
  [SLP][NFC] Added a test for a followup patch that enables handling splat loads with uses.


Compare: https://github.com/llvm/llvm-project/compare/5d2ce7663b10...511fa0800f8a


More information about the All-commits mailing list