Normally I would push back on implementations that take O(BitWidth) steps, but since the corresponding APInt function already takes O(BitWidth) steps, this KnownBits function is no worse in that regard. Also add the same early-out optimization to both the APInt function and the KnownBits function.
101 KiB
101 KiB