| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index bc0859aef3d6afef9bc4e769596070040f55b3ca..8dde18d2535aef1413fa3f26349d2fa69f264fbc 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -3914,14 +3914,8 @@ void LCodeGen::DoMathLog(LMathLog* instr) {
|
| void LCodeGen::DoMathClz32(LMathClz32* instr) {
|
| Register input = ToRegister(instr->value());
|
| Register result = ToRegister(instr->result());
|
| - Label not_zero_input;
|
| - __ bsr(result, input);
|
|
|
| - __ j(not_zero, ¬_zero_input);
|
| - __ Move(result, Immediate(63)); // 63^31 == 32
|
| -
|
| - __ bind(¬_zero_input);
|
| - __ xor_(result, Immediate(31)); // for x in [0..31], 31^x == 31-x.
|
| + __ Lzcnt(result, input);
|
| }
|
|
|
|
|
|
|