When compiling compiler-rt with -fsanitize=undefined and running testcases you
end up with the following warning:
UBSan: int_mulo_impl.inc:21:36: left shift of 1 by 63 places cannot be represented in type 'di_int' (aka 'long long')
This can be avoided by simply doing the shift in a matching unsigned variant of
the type.
The same kind of pattern seems to exist in int_mulv_impl.inc
This was found in an out of tree target.
An alternative implementation would be to change MIN and MAX into:
as this code pattern is used in another part of compiler-rt in compiler-rt/lib/builtins/fp_fixint_impl.inc