Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 74bb1327483111248f7381b6a1c35894ee6fd412..479c10127b67fd5876e4ec3dc3f2ff69025f293c 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -6,6 +6,7 @@ |
#if V8_TARGET_ARCH_X64 |
+#include "src/base/bits.h" |
#include "src/code-stubs.h" |
#include "src/hydrogen-osr.h" |
#include "src/x64/lithium-codegen-x64.h" |
@@ -1273,7 +1274,7 @@ void LCodeGen::DoDivByPowerOf2I(LDivByPowerOf2I* instr) { |
Register dividend = ToRegister(instr->dividend()); |
int32_t divisor = instr->divisor(); |
Register result = ToRegister(instr->result()); |
- DCHECK(divisor == kMinInt || IsPowerOf2(Abs(divisor))); |
+ DCHECK(divisor == kMinInt || base::bits::IsPowerOfTwo32(Abs(divisor))); |
DCHECK(!result.is(dividend)); |
// Check for (0 / -x) that will produce negative zero. |
@@ -5095,8 +5096,8 @@ void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
uint8_t tag; |
instr->hydrogen()->GetCheckMaskAndTag(&mask, &tag); |
- if (IsPowerOf2(mask)) { |
- DCHECK(tag == 0 || IsPowerOf2(tag)); |
+ if (base::bits::IsPowerOfTwo32(mask)) { |
+ DCHECK(tag == 0 || base::bits::IsPowerOfTwo32(tag)); |
__ testb(FieldOperand(kScratchRegister, Map::kInstanceTypeOffset), |
Immediate(mask)); |
DeoptimizeIf(tag == 0 ? not_zero : zero, instr->environment()); |