This patch improves SimplifyCFG to catch things like:
if (a < b) { if (b < a) <- known to be false unreachable; }
and
if (a > b) { if (b < a) { <- always true; remove control flow always reachable; } }
The later case is generally captured when the compares are canonicalized, but in my testing I found that there are cases in the wild where compares aren't always in canonical form. I do plan on addressing the FIXME in jump threading, but I wanted to get this patch approved first.
Please take a look,
Chad
I'd use something a little more descriptive -- maybe ImpliedTrue?
The Right(TM) fix here is to change isImpliedCondition to return Optional<bool>, but I don't know how much work that will be.