| Index: src/a64/lithium-a64.cc
|
| diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc
|
| index d344b130159b01502124930f5b187952e88d5ca7..1b82b33962deec3a4b7dae5ed5ed6d43df1e1dbb 100644
|
| --- a/src/a64/lithium-a64.cc
|
| +++ b/src/a64/lithium-a64.cc
|
| @@ -2377,8 +2377,7 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
| switch (instr->op()) {
|
| case kMathAbs: {
|
| Representation r = instr->representation();
|
| - // TODO(jbramley): Support smis in LMathAbs and use that.
|
| - if (r.IsTagged() || r.IsSmi()) {
|
| + if (r.IsTagged()) {
|
| // The tagged case might need to allocate a HeapNumber for the result,
|
| // so it is handled by a separate LInstruction.
|
| LOperand* input = UseRegister(instr->value());
|
| @@ -2395,9 +2394,9 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
| // The Double case can never fail so it doesn't need an environment.
|
| return DefineAsRegister(result);
|
| } else {
|
| - ASSERT(r.IsInteger32());
|
| - // The Integer32 case needs an environment because it can deoptimize
|
| - // on INT_MIN.
|
| + ASSERT(r.IsInteger32() || r.IsSmi());
|
| + // The Integer32 and Smi cases need an environment because they can
|
| + // deoptimize on minimum representable number.
|
| return AssignEnvironment(DefineAsRegister(result));
|
| }
|
| }
|
|
|