[llvm] [LSR][term-fold] Ensure the simple recurrence is reachable from the current loop (PR #83085)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 13:44:57 PST 2024


================
@@ -6811,7 +6811,7 @@ canFoldTermCondOfLoop(Loop *L, ScalarEvolution &SE, DominatorTree &DT,
   // If ToFold does not have an incoming value from LoopLatch then the simple
----------------
preames wrote:

Your comment about unreachability is a bit misleading - the reachability of the other loop isn't the key detail.  Instead, maybe something along the lines of: Make sure the recurrence matched is part of the current loop of interest.

https://github.com/llvm/llvm-project/pull/83085


More information about the llvm-commits mailing list