I believe this bisects to https://reviews.llvm.org/D44983 ([LoopUnroll] Only peel if a predicate becomes known in the loop body.)
While that revision did contain tests that showed arguably-subpar peeling for
[in]equality predicates that [not] happen in the middle of the loop,
it also disabled peeling for the *first* loop iteration,
because latch would be canonicalized to [in]equality comparison..
That was intentional as per https://reviews.llvm.org/D44983#1059583.
I'm not 100% sure that i'm using correct checks here,
but this fix appears to be going in the right direction..
Let me know if i'm missing some checks here..
Fixes PR43840.
please update the comment, it still mentions we not supporting non-monotonic predicates.