From f8ac417533d9ebee6d02ad84a1e6a6b056e6720d Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 7 Nov 2024 09:36:53 +0100 Subject: Clean up after introducing `HRol`. Clean up after https://android-review.googlesource.com/3262277 . Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I11d3b2ffd2305a841fa44345b7d2bd09de21b42d --- compiler/optimizing/instruction_simplifier_shared.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'compiler/optimizing/instruction_simplifier_shared.cc') diff --git a/compiler/optimizing/instruction_simplifier_shared.cc b/compiler/optimizing/instruction_simplifier_shared.cc index 7f575c0348..2215b93414 100644 --- a/compiler/optimizing/instruction_simplifier_shared.cc +++ b/compiler/optimizing/instruction_simplifier_shared.cc @@ -320,18 +320,15 @@ void UnfoldRotateLeft(HRol* rol) { HBasicBlock* block = rol->GetBlock(); HGraph* graph = block->GetGraph(); ArenaAllocator* allocator = graph->GetAllocator(); - HRor* ror; - + HInstruction* neg; if (rol->GetRight()->IsConstant()) { int32_t value = rol->GetRight()->AsIntConstant()->GetValue(); - HIntConstant* negated = graph->GetIntConstant(-value); - ror = new (allocator) HRor(rol->GetType(), rol->GetLeft(), negated); + neg = graph->GetIntConstant(-value); } else { - HNeg* neg = new (allocator) HNeg(DataType::Type::kInt32, rol->GetRight()); + neg = new (allocator) HNeg(DataType::Type::kInt32, rol->GetRight()); block->InsertInstructionBefore(neg, rol); - ror = new (allocator) HRor(rol->GetType(), rol->GetLeft(), neg); } - + HInstruction* ror = new (allocator) HRor(rol->GetType(), rol->GetLeft(), neg); block->ReplaceAndRemoveInstructionWith(rol, ror); } -- cgit v1.2.3-59-g8ed1b