[PATCH] D132443: [LSR] Fold terminal condition to other IV when possible
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 27 15:12:11 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6634
+ auto IsToFold = [&](PHINode &PN) -> bool {
+ if (PN.getNumIncomingValues() != 2)
+ return false;
----------------
Is `PN.getNumIncomingValues() == 2` implied by LoopSimplifyForm?
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6661
+ auto IsToHelpFold = [&](PHINode &PN) -> bool {
+ if (PN.getNumIncomingValues() != 2)
+ return false;
----------------
Is `PN.getNumIncomingValues() == 2` implied by LoopSimplifyForm?
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6668
+ // and down in the actual transformation.
+ return PN.getBasicBlockIndex(LoopPreheader) != -1 &&
+ PN.getBasicBlockIndex(LoopLatch) != -1 &&
----------------
Are the LoopPreheader and LoopLatch being predecessors of the phi implied by LoopSimplify form?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132443/new/
https://reviews.llvm.org/D132443
More information about the llvm-commits
mailing list