[PATCH] D142179: [ADT] Add bit_floor, bit_ceil, and bit_width to bit.h
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 09:56:11 PST 2023
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM with one minor
================
Comment at: llvm/unittests/ADT/BitTest.cpp:129
+ EXPECT_EQ(3, llvm::bit_width(uint32_t(4)));
+ EXPECT_EQ(3, llvm::bit_width(uint64_t(4)));
+}
----------------
maybe add tests with the msb set for bit_width / bit_floor?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142179/new/
https://reviews.llvm.org/D142179
More information about the llvm-commits
mailing list