-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 branch information
Showing
4 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters