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
D152023 made calls to __builtin_clz and __builtin_ctz with input 0 to be undefined behaviour (RFC here). However we use them in the arm-acle.h to implement __clz:
…f unsigned long/uint64_t.
Use unsigned long in place of uint32_t for both clz and cls.
As far as I can tell this matches what ACLE defines and what gcc implements.
Noticed while investigating fixing #63113
Reviewed By: tmatheson
Differential Revision: https://reviews.llvm.org/D154910
D152023 made calls to
__builtin_clz
and__builtin_ctz
with input 0 to be undefined behaviour (RFC here). However we use them in thearm-acle.h
to implement__clz
:llvm-project/clang/lib/Headers/arm_acle.h
Line 143 in c91246b
The ACLE documentation for
__clz
states:The definitions in the header will need to be updated to handle the zero case.
The text was updated successfully, but these errors were encountered: