[PATCH] D117140: [LV] Always create VPWidenCanonicalIVRecipe, optimize away later.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 02:11:39 PST 2022


fhahn updated this revision to Diff 401142.
fhahn added a comment.

Remove unnecessary early exit.

In D117140#3251403 <https://reviews.llvm.org/D117140#3251403>, @Ayal wrote:

> In D117140#3251026 <https://reviews.llvm.org/D117140#3251026>, @fhahn wrote:
>
>> In D117140#3250984 <https://reviews.llvm.org/D117140#3250984>, @Ayal wrote:
>>
>>> This is fine, thanks for accommodating, one last thought: does Canonical mean starting at zero, or possibly at EPResumeVal?
>>
>> I think checking for zero a the moment should suffice, as EPResumeVal will only be set as start value just before epilogue VPlan execution. This should also match the current behavior before the change (and  D117551 <https://reviews.llvm.org/D117551> which now contains the addition if `isCanonical`). Once a single plan contains both vector loops we might need some changes in that direction though.
>
> Resetting start of canonicalIV to EPResumeVal just before epiloque VPlan execution might invalidate passes that relied on this value being zero, including removeRedundantCanonicalIVs()? A test would be good, either confirming or reassuring :-)

Added an assert in 165e36bf180e <https://reviews.llvm.org/rG165e36bf180eecb32fa5442fd5c4d43388a136fb>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117140

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
  llvm/lib/Transforms/Vectorize/VPlanTransforms.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117140.401142.patch
Type: text/x-patch
Size: 5180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220119/1875ee9c/attachment.bin>


More information about the llvm-commits mailing list