summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2016-03-18 18:05:57 +0000
committer Roland Levillain <rpl@google.com> 2016-03-18 18:05:57 +0000
commit1a65388f1d86bb232c2e44fecb44cebe13105d2e (patch)
tree515e3000b3ad6d195101f20f33f3c9498e536593 /compiler/optimizing/inliner.cc
parentf808e8a0cc218c2b98023ef0e91f3c5b74ad2962 (diff)
Clean up art::HConstant predicates.
- Make the difference between arithmetic zero and zero-bit pattern non ambiguous. - Introduce Boolean predicates in art::HIntConstant for when they are used as Booleans. - Introduce aritmetic positive and negative zero predicates for floating-point constants. Bug: 27639313 Change-Id: Ia04ecc6f6aa7450136028c5362ed429760c883bd
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index d861e39c8b..a46478e7d6 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -912,8 +912,7 @@ bool HInliner::TryPatternSubstitution(HInvoke* invoke_instruction,
bool needs_constructor_barrier = false;
for (size_t i = 0; i != number_of_iputs; ++i) {
HInstruction* value = GetInvokeInputForArgVRegIndex(invoke_instruction, iput_args[i]);
- if (!value->IsConstant() ||
- (!value->AsConstant()->IsZero() && !value->IsNullConstant())) {
+ if (!value->IsConstant() || !value->AsConstant()->IsZeroBitPattern()) {
if (dex_cache.GetReference() == nullptr) {
dex_cache = handles_->NewHandle(resolved_method->GetDexCache());
}