[PATCH] D144381: [SCEV] Added a utility method that raising the number 2 to the desired power to SCEV
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 02:15:04 PST 2023
nikic added a comment.
> I talked to Dmitry offline, and the motivating example is in downstream code. However, I think this utility function is still a good thing to have in general, maybe someone else will use it.
There are two uses of APInt::getOneBitSet() that could make use of this API -- but they specify the bitwidth as an integer, not as a type.
Though TBH I can't say the value of `getPowerOfTwo(BitWidth, TZ)` over `getConstant(APInt::getOneBitSet(BitWidth, TZ))` is particularly large.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144381/new/
https://reviews.llvm.org/D144381
More information about the llvm-commits
mailing list