mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
[ValueTracking][NFC] Use Log2(Align) instead of countTrailingZeroes
The latter can probably be optimized to the same final code, but this might help -O0 builds.
This commit is contained in:
parent
58c20890b0
commit
ab6e2d9347
@ -2003,7 +2003,7 @@ void computeKnownBits(const Value *V, const APInt &DemandedElts,
|
||||
// Aligned pointers have trailing zeros - refine Known.Zero set
|
||||
if (isa<PointerType>(V->getType())) {
|
||||
Align Alignment = V->getPointerAlignment(Q.DL);
|
||||
Known.Zero.setLowBits(countTrailingZeros(Alignment.value()));
|
||||
Known.Zero.setLowBits(Log2(Alignment));
|
||||
}
|
||||
|
||||
// computeKnownBitsFromAssume strictly refines Known.
|
||||
|
Loading…
Reference in New Issue
Block a user