[llvm] [LoopUtils] prevent negative estimated trip count result (PR #195610)

Joel E. Denny via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 12:57:50 PDT 2026


jdenny-ornl wrote:

> But in the `LoopPeel` case, where if the `EstimatedTripCount + AlreadyPeeled` is equal to 0, the pass peels until `EstimatedTripCount` which is INT_MAX, so it effectively hangs opt.

So you want to guard against overflow in `*EstimatedTripCount + AlreadyPeeled <= MaxPeelCount`?

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


More information about the llvm-commits mailing list