[vm, compiler] Fix BoxInt32Instr to not create denormalized Mints on arm64 with compressed pointers.

Removes the assumption that the incoming int32 is sign-extended.

TEST=ffi/function_test
Change-Id: I347dccec47b4784be40c834de62ccea157d9042d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216960
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index 7432fad..aa96c5a 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -3964,13 +3964,12 @@
     if (ValueFitsSmi()) {
       return;
     }
-    __ cmp(out, compiler::Operand(value, LSL, 1));
+    __ cmpw(value, compiler::Operand(out, ASR, 1));
     __ b(&done, EQ);  // Jump if the sbfiz instruction didn't lose info.
   } else {
     ASSERT(from_representation() == kUnboxedUint32);
     // A 32 bit positive Smi has one tag bit and one unused sign bit,
     // leaving only 30 bits for the payload.
-    // __ ubfiz(out, value, kSmiTagSize, compiler::target::kSmiBits);
     __ LslImmediate(out, value, kSmiTagSize, compiler::kFourBytes);
     if (ValueFitsSmi()) {
       return;