Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index c928523f446fc6e17aebd70b7cf102990137a3cb..50d69a352fe7db043cf9f19ddb65263fd34511e2 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -1605,11 +1605,11 @@ void LCodeGen::DoShiftI(LShiftI* instr) { |
} |
break; |
case Token::SHR: |
- if (shift_count == 0 && instr->can_deopt()) { |
+ if (shift_count != 0) { |
+ __ shrl(ToRegister(left), Immediate(shift_count)); |
+ } else if (instr->can_deopt()) { |
__ testl(ToRegister(left), ToRegister(left)); |
DeoptimizeIf(negative, instr->environment()); |
- } else { |
- __ shrl(ToRegister(left), Immediate(shift_count)); |
} |
break; |
case Token::SHL: |
@@ -2234,7 +2234,9 @@ inline Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) { |
void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
LOperand* left = instr->left(); |
LOperand* right = instr->right(); |
- Condition cc = TokenToCondition(instr->op(), instr->is_double()); |
+ bool is_unsigned = |
+ instr->is_double() || instr->hydrogen()->CheckFlag(HInstruction::kUint32); |
+ Condition cc = TokenToCondition(instr->op(), is_unsigned); |
if (left->IsConstantOperand() && right->IsConstantOperand()) { |
// We can statically evaluate the comparison. |