[all-commits] [llvm/llvm-project] 552eb3: [LoopVectorize] Pass a vector type to isLegalMaske...

RosieSumpter via All-commits all-commits at lists.llvm.org
Wed Jan 12 05:38:45 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 552eb372cb8198c64caf13da34ca70af894485c8
      https://github.com/llvm/llvm-project/commit/552eb372cb8198c64caf13da34ca70af894485c8
  Author: Rosie Sumpter <rosie.sumpter at arm.com>
  Date:   2022-01-12 (Wed, 12 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.h
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.h
    M llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/tail-fold-uniform-memops.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/vector-reverse-mask4.ll
    M llvm/test/Transforms/SLPVectorizer/X86/pr47623.ll
    M llvm/test/Transforms/SLPVectorizer/X86/pr47629-inseltpoison.ll
    M llvm/test/Transforms/SLPVectorizer/X86/pr47629.ll

  Log Message:
  -----------
  [LoopVectorize] Pass a vector type to isLegalMaskedGather/Scatter

This is required to query the legality more precisely in the LoopVectorizer.

This adds another TTI function named 'forceScalarizeMaskedGather/Scatter'
function to work around the hack introduced for MVE, where
isLegalMaskedGather/Scatter would return an answer by second-guessing
where the function was called from, based on the Type passed in (vector
vs scalar). The new interface makes this explicit. It is also used by
X86 to check for vector widths where gather/scatters aren't profitable
(or don't exist) for certain subtargets.

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




More information about the All-commits mailing list