summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 296c1b02fc..efaf48cc9f 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -1008,12 +1008,8 @@ HConstant* HUnaryOperation::TryStaticEvaluation() const {
int32_t value = Evaluate(GetInput()->AsIntConstant()->GetValue());
return GetBlock()->GetGraph()->GetIntConstant(value);
} else if (GetInput()->IsLongConstant()) {
- // TODO: Implement static evaluation of long unary operations.
- //
- // Do not exit with a fatal condition here. Instead, simply
- // return `null' to notify the caller that this instruction
- // cannot (yet) be statically evaluated.
- return nullptr;
+ int64_t value = Evaluate(GetInput()->AsLongConstant()->GetValue());
+ return GetBlock()->GetGraph()->GetLongConstant(value);
}
return nullptr;
}