summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_builder.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/ssa_builder.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/ssa_builder.cc')
-rw-r--r--compiler/optimizing/ssa_builder.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/optimizing/ssa_builder.cc b/compiler/optimizing/ssa_builder.cc
index a658252e69..08ccbeee0d 100644
--- a/compiler/optimizing/ssa_builder.cc
+++ b/compiler/optimizing/ssa_builder.cc
@@ -652,16 +652,16 @@ HPhi* SsaBuilder::GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, DataType::
// We place the floating point /reference phi next to this phi.
HInstruction* next = phi->GetNext();
- if (next != nullptr
- && next->AsPhi()->GetRegNumber() == phi->GetRegNumber()
- && next->GetType() != type) {
+ if (next != nullptr &&
+ next->AsPhi()->GetRegNumber() == phi->GetRegNumber() &&
+ next->GetType() != type) {
// Move to the next phi to see if it is the one we are looking for.
next = next->GetNext();
}
- if (next == nullptr
- || (next->AsPhi()->GetRegNumber() != phi->GetRegNumber())
- || (next->GetType() != type)) {
+ if (next == nullptr ||
+ (next->AsPhi()->GetRegNumber() != phi->GetRegNumber()) ||
+ (next->GetType() != type)) {
ArenaAllocator* allocator = graph_->GetAllocator();
HInputsRef inputs = phi->GetInputs();
HPhi* new_phi = new (allocator) HPhi(allocator, phi->GetRegNumber(), inputs.size(), type);