================
@@ -1370,11 +1373,17 @@ bool LoopInterchangeLegality::currentLimitations() {
}
bool LoopInterchangeLegality::findInductions(
- Loop *L, SmallVectorImpl<PHINode *> &Inductions) {
- for (PHINode &PHI : L->getHeader()->phis()) {
+ Loop *OuterLoop, Loop *InnerLoop, SmallVectorImpl<PHINode *> &Inductions) {
+ for (PHINode &PHI : InnerLoop->getHeader()->phis()) {
InductionDescriptor ID;
- if (InductionDescriptor::isInductionPHI(&PHI, L, SE, ID))
- Inductions.push_back(&PHI);
+ if (!InductionDescriptor::isInductionPHI(&PHI, InnerLoop, SE, ID))
+ continue;
----------------
kasuga-fj wrote:
TBH, I'm not entirely sure what happens when there's a PHI in the inner loop
that isn't an induction variable. I think I need to dig deeper into such
cases...
https://github.com/llvm/llvm-project/pull/202751
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits