[all-commits] [llvm/llvm-project] b3af04: [llvm] Use llvm::countr_zero instead of findFirstS...

kazutakahirata via All-commits all-commits at lists.llvm.org
Mon Jan 23 23:07:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b3af04f880018ece856dbb2bfafc95873c08a434
      https://github.com/llvm/llvm-project/commit/b3af04f880018ece856dbb2bfafc95873c08a434
  Author: Kazu Hirata <kazu at google.com>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
    M llvm/utils/TableGen/CodeGenDAGPatterns.h

  Log Message:
  -----------
  [llvm] Use llvm::countr_zero instead of findFirstSet (NFC)

At each call to findFirstSet in this patch, the argument is known to
be nonzero, so we can safely switch to llvm::countr_zero, which will
become std::countr_zero once C++20 is available.




More information about the All-commits mailing list