[PATCH] D102515: [CostModel] Return an invalid cost for memory ops with unsupported types

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 14 10:52:56 PDT 2021


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

This adds the TTI function `isLegalToVectorizeType` to query whether a given element
type can be vectorized; for SVE this should return false for element types such as
i128 which are not supported.

The `getMemoryOpCost`, `getMaskedMemoryOpCost` & `getGatherScatterOpCost`
functions now check isLegalToVectorizeType for vector types, returning an invalid cost
if this returns false.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102515

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/CodeGen/TargetLoweringBase.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/test/Analysis/CostModel/AArch64/sve-illegal-types.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102515.345496.patch
Type: text/x-patch
Size: 10277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210514/91b57bcc/attachment.bin>


More information about the llvm-commits mailing list