ia32: fix overly conservative upper_bits_clean (by avoiding undefined behaviour)