[ARM][AArch64] Add ARM specific builtin for clz that is not undefined for 0 in ubsan.
D152023 made ubsan consider __builtin_clz of 0 undefined regardless of the target. This ensures portability and matches gcc. This causes the ACLE intrinsics to also be considered to also be considered to be undefined for 0 since they used the generic builtins as their implementation. This patch adds builtins for ARM that ubsan doesn't know about to make the behavior defined for 0. Alternatively, I could have added a zero check to the intrinsics, but the dedicated builtin will give better -O0 codegen. Fixes #63113. Reviewed By: tmatheson Differential Revision: https://reviews.llvm.org/D154915
Loading
Please sign in to comment