The algorithm in allLoopPathsLeadToBlock() does not handle the case where the loop latch is part of the predecessor set correctly: In this case, we may take the backedge (escaping to a different loop iteration) and not execute other latch successors. This can happen if the latch is part of an inner cycle. Fixes https://github.com/llvm/llvm-project/issues/57780. Differential Revision: https://reviews.llvm.org/D134279
33 KiB
33 KiB