diff options
| author | 2015-08-05 10:03:46 +0000 | |
|---|---|---|
| committer | 2015-08-05 10:03:46 +0000 | |
| commit | 902ec264e1040cbfd783c44809ed10b261bd78ee (patch) | |
| tree | 915f7d23caf192e440a585b9495f4d787e8d26bf /compiler/optimizing/nodes.cc | |
| parent | d4fd591406f356dcb8feaa262c19983cacb9116d (diff) | |
| parent | c90bc7c07f9bd24b5424cfb1e3f064fbae5334d6 (diff) | |
Merge "Add constant folding for long unary operations in opt. compiler."
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 61dadc2704..d7795f9dff 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1015,12 +1015,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; } |