[all-commits] [llvm/llvm-project] 057905: Fix MSVC signed/unsigned comparison warning. NFCI.

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Aug 2 03:25:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 057905011660200466fe1ab25cca76717e382d0b
      https://github.com/llvm/llvm-project/commit/057905011660200466fe1ab25cca76717e382d0b
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-08-02 (Mon, 02 Aug 2021)

  Changed paths:
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp

  Log Message:
  -----------
  Fix MSVC signed/unsigned comparison warning. NFCI.


  Commit: 7397dcb403c2214d76444b3f3b16bb4eeed42e58
      https://github.com/llvm/llvm-project/commit/7397dcb403c2214d76444b3f3b16bb4eeed42e58
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-08-02 (Mon, 02 Aug 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/IR/Instructions.h
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/ARM/shuffle.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll

  Log Message:
  -----------
  [TTI] Add basic SK_InsertSubvector shuffle mask recognition

This patch adds an initial ShuffleVectorInst::isInsertSubvectorMask helper to recognize 2-op shuffles where the lowest elements of one of the sources are being inserted into the "in-place" other operand, this includes "concat_vectors" patterns as can be seen in the Arm shuffle cost changes. This also helped fix a x86 issue with irregular/length-changing SK_InsertSubvector costs - I'm hoping this will help with D107188

This doesn't currently attempt to work with 1-op shuffles that could either be a "widening" shuffle or a self-insertion.

The self-insertion case is tricky, but we currently always match this with the existing SK_PermuteSingleSrc logic.

The widening case will be addressed in a follow up patch that treats the cost as 0.

Masks with a high number of undef elts will still struggle to match optimal subvector widths - its currently bounded by minimum-width possible insertion, whilst some cases would benefit from wider (pow2?) subvectors.

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


Compare: https://github.com/llvm/llvm-project/compare/f117ed542fd2...7397dcb403c2


More information about the All-commits mailing list