[all-commits] [llvm/llvm-project] ad3e0e: [APInt] Add APInt::isOneBitSet helper.
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Tue Jan 3 08:12:24 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ad3e0e4b419461bbc56a79a33167e93141ba5859
https://github.com/llvm/llvm-project/commit/ad3e0e4b419461bbc56a79a33167e93141ba5859
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M llvm/include/llvm/ADT/APInt.h
M llvm/unittests/ADT/APIntTest.cpp
Log Message:
-----------
[APInt] Add APInt::isOneBitSet helper.
Equivalent tester for the APInt::getOneBitSet builder.
This should allow us to remove a number of cases where we're doing "Val == (1 << BitNo)" style code patterns.
More information about the All-commits
mailing list