[libc] Use __builtin_ctzll instead of __builtin_ctzl in elements_x86.h.
authorSiva Chandra Reddy <sivachandra@google.com>
Fri, 25 Jun 2021 05:43:47 +0000 (05:43 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Fri, 25 Jun 2021 22:58:13 +0000 (22:58 +0000)
commit2e9c75daffddd65e37c3236708b5b133e6f5f2f5
tree9d3510e97f64e4465ddb63d13104f013c6330cc7
parentfdd4c199a1ec68a231ea0086239e7d8287a40fad
[libc] Use __builtin_ctzll instead of __builtin_ctzl in elements_x86.h.

__builtin_ctzl takes an unsigned long argument which need not be 64-bit
long on all platforms. Using __builtin_ctzll, which takes an unsigned
long long argument, ensures that 64-bit values will be handled on a
wider range of platforms.

Without this change, the test corresponding to M512 fails in Windows.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D104897
libc/src/string/memory_utils/elements_x86.h