[PATCH] D117140: [LV] Always create VPWidenCanonicalIVRecipe, optimize away later.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 00:13:48 PST 2022
Ayal added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:332
+ return;
+
+ VPBasicBlock *HeaderVPBB = Plan.getVectorLoopRegion()->getEntryBasicBlock();
----------------
Would be better to find VPWidenCanonicalIVRecipe by searching the users of getCanonicalIV(), after connecting the former to the latter, instead of looking for it in HeaderVPBB?
Would be better to search for an IV recipe (among HeaderVPBB->phis()) with an isCanonicalID and same type as widen canonical IV, thereby clearly proving their equivalence, instead of relying on OriginalCanonicalIV?
================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:351
+
+ if (WidenOriginalIV) {
+ WidenNewIV->replaceAllUsesWith(WidenOriginalIV);
----------------
``` if (WidenOriginalIV && WidenNewIV) {
```
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