You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[builtins] Fix signed shift overflows in absvti2.c and negvti2.c
When compiling the builtins with the undefined behavior sanitizer and running testcases you end up with the following warning:
UBSan: negvti2.c:22:32: left shift of 1 by 127 places cannot be represented in type 'ti_int' (aka '__int128')
UBSan: absvti2.c:23:23: left shift of 1 by 127 places cannot be represented in type 'ti_int' (aka '__int128')
This can be avoided by doing the shift in a matching unsigned variant of the type.
This is the same kind of fixes that already was done in commit
854686f
This was found in an out of tree target.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D158816
0 commit comments