[all-commits] [llvm/llvm-project] 2e9c75: [libc] Use __builtin_ctzll instead of __builtin_ct...

Siva Chandra via All-commits all-commits at lists.llvm.org
Fri Jun 25 15:58:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e9c75daffddd65e37c3236708b5b133e6f5f2f5
      https://github.com/llvm/llvm-project/commit/2e9c75daffddd65e37c3236708b5b133e6f5f2f5
  Author: Siva Chandra Reddy <sivachandra at google.com>
  Date:   2021-06-25 (Fri, 25 Jun 2021)

  Changed paths:
    M libc/src/string/memory_utils/elements_x86.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list