[InstCombine] If there is a known-bit transform is_pow2 check to just check for any other bits
in `ctpop(X) eq/ne 1` or `ctpop(X) ugt/ule 1`, if there is any known-bit in `X`, instead of going through `ctpop`, we can just test if there are any other known bits in `X`. If there are, `X` is not a power of 2. If there aren't, `X` is a power of 2. https://alive2.llvm.org/ce/z/eLMJgU Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D152677
Loading
Please sign in to comment