[PATCH] D115329: [LoopVectorize] Pass a vector type to isLegalMaskedGather/Scatter

Rosie Sumpter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 04:16:01 PST 2021


RosieSumpter created this revision.
RosieSumpter added reviewers: sdesmalen, david-arm, kmclaughlin, dmgreen.
Herald added subscribers: pengfei, arphaman, hiraditya.
RosieSumpter requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115329

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.h
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Analysis/CostModel/X86/masked-gather-i32-with-i8-index.ll
  llvm/test/Analysis/CostModel/X86/masked-gather-i64-with-i8-index.ll
  llvm/test/Transforms/LoopVectorize/AArch64/tail-fold-uniform-memops.ll
  llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115329.392706.patch
Type: text/x-patch
Size: 51889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211208/8d895188/attachment.bin>


More information about the llvm-commits mailing list