Fix arm64 build.

Change-Id: Ib6babc1c6e8f2e78badc93cfcf89950e53f71bbb
diff --git a/compiler/optimizing/common_arm64.h b/compiler/optimizing/common_arm64.h
index 007324e..9447d3b 100644
--- a/compiler/optimizing/common_arm64.h
+++ b/compiler/optimizing/common_arm64.h
@@ -118,8 +118,14 @@
 
 static inline int64_t Int64ConstantFrom(Location location) {
   HConstant* instr = location.GetConstant();
-  return instr->IsIntConstant() ? instr->AsIntConstant()->GetValue()
-                                : instr->AsLongConstant()->GetValue();
+  if (instr->IsIntConstant()) {
+    return instr->AsIntConstant()->GetValue();
+  } else if (instr->IsNullConstant()) {
+    return 0;
+  } else {
+    DCHECK(instr->IsLongConstant());
+    return instr->AsLongConstant()->GetValue();
+  }
 }
 
 static inline vixl::Operand OperandFrom(Location location, Primitive::Type type) {