[SCEV] Infer addrec nowrap flags during range analysis (#202964)

When we're computing the range of the addrec, we already have to reason
about whether it wraps, so we may as well determine the nowrap flags at
the same time.

This is more precise than the previous logic that took the addrec range
and checked whether adding a step to it does not wrap. For example, an
`{0,+,1}` addrec with a full range can still be non-wrapping.

Note that I removed some assertions in the SCEV printed that predicated
exit counts actually have predicates. Due to SCEV's query order
dependence, this can happen, also prior to this change, see for example
https://llvm.godbolt.org/z/cWK1MMEqv. While this indicates suboptimal
results, it's not a bug, and we should not assert.

Fixes https://github.com/llvm/llvm-project/issues/200788.

GitOrigin-RevId: 34ed491f6375a39248f71a98eaab5810dfc1324e
1 file changed