[PATCH] D102253: [LV] Prevent vectorization with unsupported element types.

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 10:26:43 PDT 2021


kmclaughlin updated this revision to Diff 355284.
kmclaughlin marked an inline comment as done.
kmclaughlin edited the summary of this revision.
kmclaughlin added a comment.

- Split `getSmallestAndWidestTypes` into two functions. `collectAllElementTypesInLoop` now iterates over every instruction in the loop and collects a list of the element types found, which is used later by `canWidenLoopWithScalableVectors` to disable scalable vectorization if any of the types are illegal. `getSmallestAndWidestTypes` now only returns the min & max widths found in the list of element types.
- Moved the `Ty->isIntegerTy(1)` check into `isElementTypeLegalForScalableVector`
- Added a test which stores an loop invariant i128 value to a variant address.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102253/new/

https://reviews.llvm.org/D102253

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/scalable-reductions.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102253.355284.patch
Type: text/x-patch
Size: 15464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210629/62708dab/attachment.bin>


More information about the llvm-commits mailing list