Add support for min/max flavor selects in computeConstantRange(), which allows us to fold comparisons of a min/max against a constant in InstSimplify. This was suggested by @spatel as an alternative approach to D59378. I've also added the infinite looping test from that revision here.
My main concern here would be compile time, I don't really have a handle on how expensive matchSelectPattern() is and whether it's appropriate to use in code used by InstSimplify.