From c08fb725b561ead05dc120f2e92ea5228d14eec0 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 15 Aug 2024 07:40:38 +0000 Subject: Change `MakeCondition()` to take `IfCondition`... ... instead of the instruction type argument. And continue with loop construction cleanup in gtests. Test: m test-art-host-gtest Change-Id: I8cb83ae0c6d3cdb2a2ee4da0608cfeb69df722eb --- compiler/optimizing/superblock_cloner_test.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/superblock_cloner_test.cc') diff --git a/compiler/optimizing/superblock_cloner_test.cc b/compiler/optimizing/superblock_cloner_test.cc index 11d7db8b7e..4a61e45021 100644 --- a/compiler/optimizing/superblock_cloner_test.cc +++ b/compiler/optimizing/superblock_cloner_test.cc @@ -48,9 +48,9 @@ class SuperblockClonerTest : public OptimizingUnitTest { HIntConstant* const_128 = graph_->GetIntConstant(128); // Header block. - HPhi* phi = MakePhi(loop_header, {const_0, /* placeholder */ const_0}); + auto [phi, induction_inc] = MakeLinearLoopVar(loop_header, loop_body, const_0, const_1); HInstruction* suspend_check = MakeSuspendCheck(loop_header); - HInstruction* loop_check = MakeCondition(loop_header, phi, const_128); + HInstruction* loop_check = MakeCondition(loop_header, kCondGE, phi, const_128); MakeIf(loop_header, loop_check); // Loop body block. @@ -62,9 +62,6 @@ class SuperblockClonerTest : public OptimizingUnitTest { HInstruction* add = MakeBinOp(loop_body, DataType::Type::kInt32, array_get, const_1); HInstruction* array_set = MakeArraySet(loop_body, null_check, bounds_check, add, DataType::Type::kInt32, dex_pc); - HInstruction* induction_inc = MakeBinOp(loop_body, DataType::Type::kInt32, phi, const_1); - - phi->ReplaceInput(induction_inc, 1u); // Update back-edge input. graph_->SetHasBoundsChecks(true); -- cgit v1.2.3-59-g8ed1b