If we have an exit test in a loop which is controlled by the overflow flag on an add.with.overflow intrinsic, we can possible compute which iteration would cause overflow. Knowing an exit count for the loop, then drives LFTR which is then able to rewrite the check in the form which eliminates the need for the overflow check entirely.
(Noticed while looking at the output of the PoisonChecking tool, but unrelated.)
It's not wrong, but unnecessarily restrictive and a bit confusing to do the isKnownPositive check for an unsigned addition.
It might make sense to handle the negative stride case right away with a code structure like this:
This should make it easy to extend to Sub as well.