[llvm] [LoopPeel] Allow bidirection condition change for last iteration peeling (PR #143562)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 10 11:13:15 PDT 2025


preames wrote:

> > There's a possible concern here - the condition doesn't appear to be being discharged in the main loop after peeling. I can't find anything which seems specific to the inverted predicate, so I think this is an existing issue for any reverse peeling, but am I missing something?

> This isn't specific to this patch at all...

Though, it does look to be specific to last iteration peeling.  The forward peel path has a bit of code which checks the next iteration, specifically to guard against this case - by peeling on extra iteration.  I think we just missed this when doing peel last, and need to handle it.  


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


More information about the llvm-commits mailing list