[PATCH] D117140: [LV] Always create VPWidenCanonicalIVRecipe, optimize away later.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 10:13:52 PST 2022
Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.
In D117140#3253999 <https://reviews.llvm.org/D117140#3253999>, @fhahn wrote:
> 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>.
Thanks!
For epilog VPlan execution, the start of all IV's should be bumped according to EPResumeVal; perhaps better to model CanonicalIVStartValue as an abstract VPValue of VPlan similar to TripCount and BackedgeTakenCount, w/o claiming it is zero prematurely.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117140/new/
https://reviews.llvm.org/D117140
More information about the llvm-commits
mailing list