From f2eef5f0e445f3dd439f91ee8db5fdfa2129b892 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 6 Apr 2023 10:29:19 +0000 Subject: Use `down_cast<>` in `HInstruction::As##type()`. One overload used `down_cast<>` and the other used `static_cast<>`, so make it consistent. Also avoid some unnecessary `As##type()` calls and make some style adjustments. Test: m test-art-host-gtest Change-Id: I1f368a0c21647b44fffb7361dbb92d8a09fbe904 --- compiler/optimizing/loop_optimization.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/loop_optimization.cc') diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc index 7a52502562..d5e34634c8 100644 --- a/compiler/optimizing/loop_optimization.cc +++ b/compiler/optimizing/loop_optimization.cc @@ -2026,7 +2026,7 @@ HInstruction* HLoopOptimization::ReduceAndExtractIfNeeded(HInstruction* instruct // x = REDUCE( [x_1, .., x_n] ) // y = x_1 // along the exit of the defining loop. - HInstruction* reduce = new (global_allocator_) HVecReduce( + HVecReduce* reduce = new (global_allocator_) HVecReduce( global_allocator_, instruction, type, vector_length, kind, kNoDexPc); exit->InsertInstructionBefore(reduce, exit->GetFirstInstruction()); instruction = new (global_allocator_) HVecExtractScalar( @@ -2040,7 +2040,7 @@ HInstruction* HLoopOptimization::ReduceAndExtractIfNeeded(HInstruction* instruct vector_length, 0u); exit->InsertInstructionBefore(set_pred, reduce); - reduce->AsVecOperation()->SetMergingGoverningPredicate(set_pred); + reduce->SetMergingGoverningPredicate(set_pred); instruction->AsVecOperation()->SetMergingGoverningPredicate(set_pred); } } -- cgit v1.2.3-59-g8ed1b