[PATCH] D119661: [LV] Support chained phis as incoming values for first-order recurs.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 13:03:51 PDT 2022
fhahn updated this revision to Diff 453103.
fhahn marked 3 inline comments as done.
fhahn added a comment.
Addressed latest comments, thanks!
In D119661#3726864 <https://reviews.llvm.org/D119661#3726864>, @Ayal wrote:
> In D119661#3723058 <https://reviews.llvm.org/D119661#3723058>, @fhahn wrote:
>
>> In D119661#3722786 <https://reviews.llvm.org/D119661#3722786>, @Ayal wrote:
>>
>>> Nice reuse of chained FOR's!
>
> Yeah, it seems `First` is no longer accurate for both LVLegality and IVDescriptors (but is for the recipes). Is there any benefit in caching the non-header-phi `Previous` in the IVDescriptor, given the iteration-by-iteration implementation?
Updated the naming. I've not added the filed for the non-header previous yet, because its uses currently are minimal.
>>> Wonder if some instCombine pattern may subsequently fold the multiple shuffles (and the multiple incoming vectors each holding a single element) to optimize higher-order recurrence where some phi's feed only other phi's w/o other users.
>>
>> Unfortunately it doesn't look like instcombine will be able to fold those shuffles, e.g.: https://llvm.godbolt.org/z/a8YoM6ev9
>
> Worth leaving a TODO somewhere?
I added a TODO at the point where we construct VPFirstOrderRecurrencePHIRecipe.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119661/new/
https://reviews.llvm.org/D119661
Files:
llvm/include/llvm/Analysis/IVDescriptors.h
llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
llvm/lib/Analysis/IVDescriptors.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119661.453103.patch
Type: text/x-patch
Size: 60826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220816/0bcf6f7a/attachment-0001.bin>
More information about the llvm-commits
mailing list