As discussed in rG0481e1ae3c17, we can use icmp simplification to reduce min/max intrinsics, so we don't have to re-implement a long list of possible transforms.
But (if my undef reasoning is correct), this is not as easy as always returning the existing operand. In the case of undefs, we need to clamp to the limit constant. This is similar to what we do with the saturating math intrinsics.