The canonicalization for clamp removed the clamp operation when the
chosen min and max values were outside the range of what is possible to
represent with the input type. For example, if the input type is i8,
then the min and max values must be between -128 and 127. If the min and
max are, say, -200 and 200, then the clamp operation can be safely
removed.
However, as pointed out by @wyanzhao, this is wrong for floating point
types since they can represent infinity.
Fixes #62341.