Skip to content
Commit b88a9d12 authored by Craig Topper's avatar Craig Topper
Browse files

[APInt] Add a isOneValue method that can determine if a number is 1 by only...

[APInt] Add a isOneValue method that can determine if a number is 1 by only using getActiveBits/countLeadingZeros

Previously you would have to use operator==(uint64_t) which does the getActiveBits call and a uint64_t comparison. But we can get all we need to know from the getActiveBits call.

This method will be used in another commit.

llvm-svn: 304854
parent 3b340613
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment