diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-01-21 17:33:43 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-01-21 17:33:43 +0000 |
commit | b6b114c02b8bacd3b5d64e646fdaefa03c069c61 (patch) | |
tree | cd702f32a9241c94d9e0d12828f3bcb0291b087b /compiler | |
parent | 73d8fe409fbf2cb9665779690660ccc852d60431 (diff) | |
parent | fa93b504b324784dd9a96e28e6e8f3f1b1ac456a (diff) | |
download | art-b6b114c02b8bacd3b5d64e646fdaefa03c069c61.tar.gz art-b6b114c02b8bacd3b5d64e646fdaefa03c069c61.tar.bz2 art-b6b114c02b8bacd3b5d64e646fdaefa03c069c61.zip |
Merge "Do not use HNot for creating !bool."
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/optimizing/code_generator_arm.cc | 4 | ||||
-rw-r--r-- | compiler/optimizing/code_generator_arm64.cc | 4 | ||||
-rw-r--r-- | compiler/optimizing/code_generator_x86.cc | 4 | ||||
-rw-r--r-- | compiler/optimizing/code_generator_x86_64.cc | 4 | ||||
-rw-r--r-- | compiler/optimizing/instruction_simplifier.cc | 5 |
5 files changed, 2 insertions, 19 deletions
diff --git a/compiler/optimizing/code_generator_arm.cc b/compiler/optimizing/code_generator_arm.cc index 8c07b46173..c6a6974792 100644 --- a/compiler/optimizing/code_generator_arm.cc +++ b/compiler/optimizing/code_generator_arm.cc @@ -2452,10 +2452,6 @@ void InstructionCodeGeneratorARM::VisitNot(HNot* not_) { Location out = locations->Out(); Location in = locations->InAt(0); switch (not_->InputAt(0)->GetType()) { - case Primitive::kPrimBoolean: - __ eor(out.AsRegister<Register>(), in.AsRegister<Register>(), ShifterOperand(1)); - break; - case Primitive::kPrimInt: __ mvn(out.AsRegister<Register>(), ShifterOperand(in.AsRegister<Register>())); break; diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index 271eb82ee6..760d2bed32 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -2288,10 +2288,6 @@ void LocationsBuilderARM64::VisitNot(HNot* instruction) { void InstructionCodeGeneratorARM64::VisitNot(HNot* instruction) { switch (instruction->InputAt(0)->GetType()) { - case Primitive::kPrimBoolean: - __ Eor(OutputRegister(instruction), InputRegisterAt(instruction, 0), Operand(1)); - break; - case Primitive::kPrimInt: case Primitive::kPrimLong: __ Mvn(OutputRegister(instruction), InputOperandAt(instruction, 0)); diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index ac6fdbcfe9..2d304122fa 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -2610,10 +2610,6 @@ void InstructionCodeGeneratorX86::VisitNot(HNot* not_) { Location out = locations->Out(); DCHECK(in.Equals(out)); switch (not_->InputAt(0)->GetType()) { - case Primitive::kPrimBoolean: - __ xorl(out.AsRegister<Register>(), Immediate(1)); - break; - case Primitive::kPrimInt: __ notl(out.AsRegister<Register>()); break; diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index 350392fbf4..da83b76bbb 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -2471,10 +2471,6 @@ void InstructionCodeGeneratorX86_64::VisitNot(HNot* not_) { locations->Out().AsRegister<CpuRegister>().AsRegister()); Location out = locations->Out(); switch (not_->InputAt(0)->GetType()) { - case Primitive::kPrimBoolean: - __ xorq(out.AsRegister<CpuRegister>(), Immediate(1)); - break; - case Primitive::kPrimInt: __ notl(out.AsRegister<CpuRegister>()); break; 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)); } } } |