summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_optimization.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2023-04-06 10:29:19 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2023-04-25 17:02:47 +0000
commitf2eef5f0e445f3dd439f91ee8db5fdfa2129b892 (patch)
tree519b828880ce20c98746c895e5994c1c882d20ca /compiler/optimizing/loop_optimization.cc
parentb5fcab944b3786f27ab6b698685109bfc7f785fd (diff)
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
Diffstat (limited to 'compiler/optimizing/loop_optimization.cc')
-rw-r--r--compiler/optimizing/loop_optimization.cc4
1 files changed, 2 insertions, 2 deletions
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);
}
}