diff options
author | 2024-08-15 07:40:38 +0000 | |
---|---|---|
committer | 2024-08-21 09:12:50 +0000 | |
commit | c08fb725b561ead05dc120f2e92ea5228d14eec0 (patch) | |
tree | c306cd68d8f26a33b3c45e2f07db695dccc00e6e /compiler/optimizing/superblock_cloner_test.cc | |
parent | 1ea8807afeea6cd48127449cbd10458cc32cf4ce (diff) |
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
Diffstat (limited to 'compiler/optimizing/superblock_cloner_test.cc')
-rw-r--r-- | compiler/optimizing/superblock_cloner_test.cc | 7 |
1 files changed, 2 insertions, 5 deletions
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<HGreaterThanOrEqual>(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<HAdd>(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<HAdd>(loop_body, DataType::Type::kInt32, phi, const_1); - - phi->ReplaceInput(induction_inc, 1u); // Update back-edge input. graph_->SetHasBoundsChecks(true); |