[PATCH] D119683: [LV] Mark induction PHI nodes as allowed exits (NFC).
Ricky Zhou via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 17:39:36 PST 2022
rickyz updated this revision to Diff 408305.
rickyz added a comment.
Remove comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119683/new/
https://reviews.llvm.org/D119683
Files:
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
Index: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
@@ -566,14 +566,12 @@
PrimaryInduction = Phi;
}
- // Both the PHI node itself, and the "post-increment" value feeding
- // back into the PHI node may have external users.
- // We can allow those uses, except if the SCEVs we have for them rely
- // on predicates that only hold within the loop, since allowing the exit
- // currently means re-using this SCEV outside the loop (see PR33706 for more
- // details).
+ AllowedExit.insert(Phi);
+
+ // Allow external uses of the "post-increment" value feeding back into
+ // the PHI node unless its SCEV relies on predicates that may not hold
+ // outside of the loop (see PR33706 for more details).
if (PSE.getPredicate().isAlwaysTrue()) {
- AllowedExit.insert(Phi);
AllowedExit.insert(Phi->getIncomingValueForBlock(TheLoop->getLoopLatch()));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119683.408305.patch
Type: text/x-patch
Size: 1091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220214/7701488d/attachment.bin>
More information about the llvm-commits
mailing list