As diagnosed by Justin Bogner in http://llvm.org/bugs/show_bug.cgi?id=18223:
ScalarEvolution::isKnownPredicate() can wrongly reduce a comparison when both the LHS and RHS are SCEVAddRecExprs.
This patch checks that both LHS and RHS are guarded in the case when both are SCEVAddRecExprs.
The test case is against indvars because I could not find a way to directly test SCEV.