Most of this is fairly straight forward. I was a bit surprised to find we didn't have smin/umin on ConstantRange. Careful review of that would be appreciated.
Note that I'm only handling two constant ranges at this point. It would be reasonable to consider treating overdefined as a full range if the instruction is typed as an integer, but that should be a separate change.