Often we can simplify the CFG based on dominating conditions. However, we miss opportunities when we merge blocks with a common destination.
For example, before this change we would need to run -simplifycfg -instcombine -simplifycfg on test4_no_fold to arrive at the code we can now generate after a single run of -simplifycfg. We didn't appear to have any test coverage when merging common destinations, so I went ahead and added test4_fold as an example.
I found a case in Spec2006/soplex where this further removed unreachable code. As expected, I found no cases where code size increased across Spec2000/Spec2006. As isImpliedCondition continues to expand in capabilities I expect more opportunities to be exposed.
Chad