[PATCH] D113973: [LoopVectorize][CostModel] Choose smaller VFs for in-loop reductions with no loads/stores

Rosie Sumpter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 01:32:19 PST 2021


RosieSumpter updated this revision to Diff 393814.
RosieSumpter edited the summary of this revision.
RosieSumpter added a comment.

- Change name of `collectCastsToIgnore` to `collectCastInstrs` and make it a member function of `RecurrenceDescriptor`.
- Modify `collectCastInstrs` to also collect cast instructions where the destination type is the same as the recurrence type.
- Call `collectCastInstrs` from `LoopVectorizationCostModel::getSmallestAndWidestType` in the case of in-loop reductions with no loads/stores to check through casts on recurrence operands when determining the max width.


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

https://reviews.llvm.org/D113973

Files:
  llvm/include/llvm/Analysis/IVDescriptors.h
  llvm/lib/Analysis/IVDescriptors.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/smallest-and-widest-types.ll
  llvm/test/Transforms/LoopVectorize/X86/funclet.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113973.393814.patch
Type: text/x-patch
Size: 8215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211213/d738b644/attachment.bin>


More information about the llvm-commits mailing list