This patch replaces incorret assert with a check. It asserts that if SCEV
cannot prove isKnownPredicate(A != B), then it should be able to prove
isKnownPredicate(A == B).
Both these fact may be not provable. It is shown in the provided test:
Could not prove: {-294,+,-2}<%bb1> != 0
Asserting: {-294,+,-2}<%bb1> == 0
Obviously, this SCEV is not equal to zero, but 0 is in its range so we cannot
also prove that it is not zero.
Instead of assert, we should be checking the required conditions explicitly.
are the undef here and in other places required for the test case? Otherwise I think it would be better to replace them with constants/regular values to make the test case more robust. Same for branch on constants.