Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 159fd3d03886a7e4f153f76816f1b554723de2c0..7c1cf238c5c938477beba21a600ca5b0a6cdc988 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1645,11 +1645,11 @@ void LCodeGen::DoShiftI(LShiftI* instr) { |
} |
break; |
case Token::SHR: |
- if (shift_count == 0 && instr->can_deopt()) { |
+ if (shift_count != 0) { |
+ __ shr(ToRegister(left), shift_count); |
+ } else if (instr->can_deopt()) { |
__ test(ToRegister(left), ToRegister(left)); |
DeoptimizeIf(sign, instr->environment()); |
- } else { |
- __ shr(ToRegister(left), shift_count); |
} |
break; |
case Token::SHL: |
@@ -2243,7 +2243,9 @@ 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. |