Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index 24b10492e1d1eb249b7fe823bd06da3ff82f1516..840634febdf93c79be82197c7156d4e86b2c0e82 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -2019,16 +2019,14 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
__ Ubfx(right, right, kSmiShift, 5); |
__ Lsl(result, left, right); |
break; |
- case Token::SHR: { |
- Label right_not_zero; |
- __ Cbnz(right, &right_not_zero); |
- __ Tbnz(left, kXSignBit, &stub_call); |
- __ Bind(&right_not_zero); |
+ case Token::SHR: |
+ // If `left >>> right` >= 0x80000000, the result is not representable in a |
+ // signed 32-bit smi. |
__ Ubfx(right, right, kSmiShift, 5); |
- __ Lsr(result, left, right); |
- __ Bic(result, result, kSmiShiftMask); |
+ __ Lsr(x10, left, right); |
+ __ Tbnz(x10, kXSignBit, &stub_call); |
+ __ Bic(result, x10, kSmiShiftMask); |
break; |
- } |
case Token::ADD: |
__ Adds(x10, left, right); |
__ B(vs, &stub_call); |