mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
MathExtras: Bring Count(Trailing|Leading)Ones and CountPopulation in line with countTrailingZeros
Update all callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -147,9 +147,7 @@ SDValue XformMskToBitPosU3Imm(uint8_t Imm) {
|
||||
// Return true if there is exactly one bit set in V, i.e., if V is one of the
|
||||
// following integers: 2^0, 2^1, ..., 2^31.
|
||||
bool ImmIsSingleBit(uint32_t v) const {
|
||||
uint32_t c = CountPopulation_64(v);
|
||||
// Only return true if we counted 1 bit.
|
||||
return c == 1;
|
||||
return isPowerOf2_32(v);
|
||||
}
|
||||
|
||||
// XformM5ToU5Imm - Return a target constant with the specified value, of type
|
||||
|
Reference in New Issue
Block a user