summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-11-10 18:31:55 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-11-10 18:31:55 +0000
commitfeaf26db63a62bce5a80550f500efa67ff64424f (patch)
tree4df965d3e647ae9a6d62b28e747e6da03c30c052 /compiler/optimizing/nodes.cc
parent969670298516b9316b36270fcc4c21bfcd499595 (diff)
parent9e23df5c21bed53ead79e3131b67105abc8871e4 (diff)
Merge "Optimizing: Improve constant folding + DCE for inlining."
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 8100b58ae6..716888a269 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -1095,6 +1095,8 @@ HConstant* HBinaryOperation::TryStaticEvaluation() const {
} else if (GetRight()->IsLongConstant()) {
return Evaluate(GetLeft()->AsLongConstant(), GetRight()->AsLongConstant());
}
+ } else if (GetLeft()->IsNullConstant() && GetRight()->IsNullConstant()) {
+ return Evaluate(GetLeft()->AsNullConstant(), GetRight()->AsNullConstant());
}
return nullptr;
}