Canonicalize branch predicates as it is done by InstCombine.
This patch is the first step to move the branch predicate canonicalization transformation from InstCombine to SimplifyCFG.
This move is needed to make InstCombine preserve CFG. Currently we have a bug 46098 which reports PostDomTree invalidation once InstCombine swaps branches in a post-order unreachable block. See discussion in D81089.
The new transformation is disabled by default (the new flag simplifycfg-canonicalize-branch-predicates). So the patch is safe but. The sensitive tests are fixed and get additional option -simplifycfg-canonicalize-branch-predicates.