The assertion in computeExitLimitFromCondFromBinOp() is meant to check that when the the exit condition is in select form, we would always return a backedge taken count of zero (BECount->isZero()) if the exit limit for the first operand is zero (EL0.ExactNotTaken->isZero()).
If the exit condition is in AND/OR form, it is okay to return BECount as Umin(EL0.ExactNotTaken, EL1.ExactNotTaken) since AND/OR is poison-safe. This is not the case if the the exit condition is in select form.
So the correct assertion is the following
assert(isa<BinaryOperator>(ExitCond) || !EL0.ExactNotTaken->isZero() || BECount->isZero());
which means if ExitCond is in AND/OR form, nothing needs to be checked further. Otherwise (it is in select form), and we will need to return a backedge taken count of zero if the exit limit for the first operand is zero.
With the current assert, if if ExitCond is in select form, the condition in the assert always returns true due to !isa<BinaryOperator>(ExitCond) and the check for !EL0.ExactNotTaken->isZero() || BECount->isZero()) is never triggerred, which is not what the assert meant to be.
Dropping the first check so the assertion cover ExitCond in both AND/OR form and select form.
As suggested in the comment I removed the whole assertion since the select form is handled in ScalarEvolution::getSequentialMinMaxExpr.