[all-commits] [llvm/llvm-project] 462b60: [ADT] Bitset: add shift operators, word accessors, ...

Jiachen Yuan via All-commits all-commits at lists.llvm.org
Tue May 5 04:00:15 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 462b60ba14f28b15422c0197c19a0e9fd65fb887
      https://github.com/llvm/llvm-project/commit/462b60ba14f28b15422c0197c19a0e9fd65fb887
  Author: Jiachen Yuan <jiacheny at nvidia.com>
  Date:   2026-05-05 (Tue, 05 May 2026)

  Changed paths:
    M llvm/include/llvm/ADT/Bitset.h
    M llvm/unittests/ADT/BitsetTest.cpp

  Log Message:
  -----------
  [ADT] Bitset: add shift operators, word accessors, and etc (#193400)

This PR is split out from #191757 per reviewer request. It has the
following changes to `llvm::Bitset<N>`:
* Added `operator<<`/`<<=`/`>>`/`>>=`, `getNumWords()`, `getWord()`, and
`findLastSet()`.
* Moved the `std::array<>` constructor from protected to **public** and
**explicit**.
 
A follow-up PR will use these to re-implement `LaneBitmask` as a
`llvm::Bitset` wrapper.

---
The unit test in the PR is largely generated by LLMs. I have reviewed it
and manually applied changes to cover more edge cases.



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