This is an enhancement to add support to loop-simplify to change constant
conditional branches (eg: `br i1 true, label L1, label L2) to unconditional
branches (br label L1).
This will remove blocks from the
loop in the process. We avoid cases where a loop is completely removed.
Added test cases shows various use cases for the transformation. The benefit
would be for these branches that are created after loop-unswitching, can be
cleaned up using loop-simplifycfg.
This is pretty clearly false... for example, consider:
OldDest is no longer a Loop in the LLVM sense because loops only exist in reachable code.
Or consider the case where OldDest == block; L is not a loop anymore because you deleted the backedge.