summaryrefslogtreecommitdiff
path: root/compiler/optimizing/locations.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/locations.cc')
-rw-r--r--compiler/optimizing/locations.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/locations.cc b/compiler/optimizing/locations.cc
index f40b7f4f0c..4189bc4053 100644
--- a/compiler/optimizing/locations.cc
+++ b/compiler/optimizing/locations.cc
@@ -62,7 +62,7 @@ Location Location::RegisterOrConstant(HInstruction* instruction) {
}
Location Location::RegisterOrInt32Constant(HInstruction* instruction) {
- HConstant* constant = instruction->AsConstant();
+ HConstant* constant = instruction->AsConstantOrNull();
if (constant != nullptr) {
int64_t value = CodeGenerator::GetInt64ValueOf(constant);
if (IsInt<32>(value)) {
@@ -73,7 +73,7 @@ Location Location::RegisterOrInt32Constant(HInstruction* instruction) {
}
Location Location::FpuRegisterOrInt32Constant(HInstruction* instruction) {
- HConstant* constant = instruction->AsConstant();
+ HConstant* constant = instruction->AsConstantOrNull();
if (constant != nullptr) {
int64_t value = CodeGenerator::GetInt64ValueOf(constant);
if (IsInt<32>(value)) {