[compiler-rt] Avoid signed shift overflow in __muloXi4 and __mulvXi3
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. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D145556
Loading
Please sign in to comment