This case is interesting because ScalarEvolutionExpander lowers min(a, b) as ~max(~a,~b). I think the profitability heuristics can be made more clever/aggressive, but this is a start.
A clang bootstrapped with this change passes make check. The rule fires 159 times.