summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_mips.cc
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2016-03-18 18:05:57 +0000
committerRoland Levillain <rpl@google.com>2016-03-18 18:05:57 +0000
commit1a65388f1d86bb232c2e44fecb44cebe13105d2e (patch)
tree515e3000b3ad6d195101f20f33f3c9498e536593 /compiler/optimizing/code_generator_mips.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/code_generator_mips.cc')
-rw-r--r--compiler/optimizing/code_generator_mips.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc
index ba6c16e33e..4b2a461131 100644
--- a/compiler/optimizing/code_generator_mips.cc
+++ b/compiler/optimizing/code_generator_mips.cc
@@ -3264,13 +3264,13 @@ void InstructionCodeGeneratorMIPS::GenerateTestAndBranch(HInstruction* instructi
// Nothing to do. The code always falls through.
return;
} else if (cond->IsIntConstant()) {
- // Constant condition, statically compared against 1.
- if (cond->AsIntConstant()->IsOne()) {
+ // Constant condition, statically compared against "true" (integer value 1).
+ if (cond->AsIntConstant()->IsTrue()) {
if (true_target != nullptr) {
__ B(true_target);
}
} else {
- DCHECK(cond->AsIntConstant()->IsZero());
+ DCHECK(cond->AsIntConstant()->IsFalse()) << cond->AsIntConstant()->GetValue();
if (false_target != nullptr) {
__ B(false_target);
}