Index: src/a64/lithium-codegen-a64.cc |
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc |
index 2052a27c9743e5a5b238d688bae06b619a0c9d28..ace96598a8c1931ee41ef10ba2bc2b72bd6dec5b 100644 |
--- a/src/a64/lithium-codegen-a64.cc |
+++ b/src/a64/lithium-codegen-a64.cc |
@@ -5368,17 +5368,11 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) { |
Register output = ToRegister(instr->result()); |
if (instr->hydrogen()->value()->representation().IsSmi()) { |
- __ SmiUntag(input); |
+ __ SmiUntag(output, input); |
} else { |
DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr); |
- // TODO(jbramley): We can't use JumpIfNotSmi here because the tbz it uses |
- // doesn't always have enough range. Consider making a variant of it, or a |
- // TestIsSmi helper. |
- STATIC_ASSERT(kSmiTag == 0); |
- __ Tst(input, kSmiTagMask); |
- __ B(ne, deferred->entry()); |
- |
+ __ JumpIfNotSmi(input, deferred->entry()); |
__ SmiUntag(output, input); |
__ Bind(deferred->exit()); |
} |