[PATCH] D52392: [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set to false.
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 24 07:21:14 PDT 2018
craig.topper added a comment.
The only other header that uses the existing builtins is arm_acle.h. But
ARM returns false in isCLZForZeroUndef. So they should be creating the
cttz/ctlz intrinsics with false for the second argument from
__builtin_clz/ctz. The sanitizer code
in CodeGenFunction::EmitCheckedArgForBuiltin also checks isCLZForZeroUndef
to determine if it should emit a runtime check to flag 0 as a sanitizer
error.
~Craig
Repository:
rC Clang
https://reviews.llvm.org/D52392
More information about the cfe-commits
mailing list