[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 01:03:36 PST 2022


Ayal added a comment.

In D117140#3252232 <https://reviews.llvm.org/D117140#3252232>, @fhahn wrote:

> Address latest comments, thanks!
>
>> 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 :-)
>
> I am not sure if it is possible to add a test that has epilogue vectorization and a VPWidenCanonicalIVRecipe. We only add VPWidenCanonicalIVRecipe when folding the tail. In that case, epilogue vectorization is disabled as there's no epilogue. But we should be able to add a relevant test for the stepvector/build-scalar-steps patches I think.

OK, that's reassuring. Perhaps worth leaving behind a comment somewhere, or better - asserting when resetting start from zero to EPResumeVal that canonicalIV is used only by its Increment but not (potentially misused) by VPWidenCanonicalIVRecipe?



================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:344
+    if (!WidenOriginalIV)
+      continue;
+
----------------
Above early-exit is now redundant.


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