[all-commits] [llvm/llvm-project] b15719: [ADT] Handle uint8_t and uint16_t in countr_zero (...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sun Sep 14 20:32:09 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b15719365861502cd1c6d216ad4a0425ee6431ea
      https://github.com/llvm/llvm-project/commit/b15719365861502cd1c6d216ad4a0425ee6431ea
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-09-14 (Sun, 14 Sep 2025)

  Changed paths:
    M llvm/include/llvm/ADT/bit.h
    M llvm/unittests/ADT/BitTest.cpp

  Log Message:
  -----------
  [ADT] Handle uint8_t and uint16_t in countr_zero (#158518)

Without this patch, the uint8_t and uint16_t cases are sent to the
fallback route.  This patch fixes that by relaxing the "if" condition.

While it's hard to test that the correct control path is taken within
countr_zero, this patch adds a few tests just to verify the
correctness on uint8_t and uint16_t inputs.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list