Fix mix-type arithmetic detection in umin/max expansion (#28465)
Pointers can have different types. For these, a simple bitcast
suffices rather than going through inttoptr.
Fixes #28464
(cherry picked from commit 717ff908200b1900bae53564533d8545ede0fde4)