summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_simplifier.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-01-21 15:44:16 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-01-21 17:03:29 +0000
commitfa93b504b324784dd9a96e28e6e8f3f1b1ac456a (patch)
tree8a3e691268657db75a69c8d644e5a963abee66d6 /compiler/optimizing/instruction_simplifier.cc
parent1147eeed2ffc82ac9b1405f9fb0a6cbc8560c42b (diff)
Do not use HNot for creating !bool.
HNot folds to ~, not !. Change-Id: I681f968449a2ade7110b2f316146ad16ba5da74c
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r--compiler/optimizing/instruction_simplifier.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index 49ca44331d..63bc4ae671 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -59,10 +59,9 @@ void InstructionSimplifierVisitor::VisitEqual(HEqual* equal) {
equal->ReplaceWith(equal->InputAt(0));
equal->GetBlock()->RemoveInstruction(equal);
} else {
- // Replace (bool_value == 0) with !bool_value
+ // We should replace (bool_value == 0) with !bool_value, but we unfortunately
+ // do not have such instruction.
DCHECK_EQ(input2->AsIntConstant()->GetValue(), 0);
- equal->GetBlock()->ReplaceAndRemoveInstructionWith(
- equal, new (GetGraph()->GetArena()) HNot(Primitive::kPrimBoolean, input1));
}
}
}