If a compare instruction is same or inverse of the compare in the
branch of the loop latch, then return a constant evolution node.
This shall facilitate computations of loop exit counts in cases
where compare appears in the evolution chain of induction variables.
Will fix PR 34538
This is in the right direction, but I would do it a bit more generally. I'd use SCEVRewriteVisitor to rewrite any SCEVUnknown in Accum with the backedge taken condition as 0 or 1 (depending on the direction of the latch). That should handle not just zext but any general function of the latch condition.