summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_optimization.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-03-11 09:31:10 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-03-14 08:47:37 +0000
commit68f7caffe7a2e7d728d5447b28cf8c422be46748 (patch)
tree68e927688ed734bdf16161e52297008b61733c0c /compiler/optimizing/loop_optimization.cc
parent41f264abe76acb4f7cb545471cbbfbc30e3101ca (diff)
Make sure there are no lone UNREACHABLEs
Either remove them, or add a LOG(FATAL) before them. Bug: 328756212 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Test: m test-art-host-gtest Change-Id: Ibf2bddb0a4add5a844a515a040b3751acc7faf84
Diffstat (limited to 'compiler/optimizing/loop_optimization.cc')
-rw-r--r--compiler/optimizing/loop_optimization.cc30
1 files changed, 11 insertions, 19 deletions
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index f6d69ca789..28712302c5 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -2455,13 +2455,9 @@ HInstruction* HLoopOptimization::GenerateVecOp(HInstruction* org,
new (global_allocator_) HAbs(org_type, opa, dex_pc));
case HInstruction::kEqual: {
// Special case.
- if (vector_mode_ == kVector) {
- vector = new (global_allocator_) HVecCondition(
- global_allocator_, opa, opb, type, vector_length_, dex_pc);
- } else {
- DCHECK(vector_mode_ == kSequential);
- UNREACHABLE();
- }
+ DCHECK_EQ(vector_mode_, kVector);
+ vector = new (global_allocator_)
+ HVecCondition(global_allocator_, opa, opb, type, vector_length_, dex_pc);
}
break;
default:
@@ -2772,19 +2768,14 @@ bool HLoopOptimization::VectorizeIfCondition(LoopNode* node,
vector_map_->Get(opa_promoted),
vector_map_->Get(opb_promoted),
type);
+ DCHECK_EQ(vector_mode_, kVector);
+ HInstruction* vec_pred_not = new (global_allocator_)
+ HVecPredNot(global_allocator_, vec_cond, type, vector_length_, hif->GetDexPc());
- if (vector_mode_ == kVector) {
- HInstruction* vec_pred_not = new (global_allocator_) HVecPredNot(
- global_allocator_, vec_cond, type, vector_length_, hif->GetDexPc());
-
- vector_map_->Put(hif, vec_pred_not);
- BlockPredicateInfo* pred_info = predicate_info_map_->Get(hif->GetBlock());
- pred_info->SetControlFlowInfo(vec_cond->AsVecPredSetOperation(),
- vec_pred_not->AsVecPredSetOperation());
- } else {
- DCHECK(vector_mode_ == kSequential);
- UNREACHABLE();
- }
+ vector_map_->Put(hif, vec_pred_not);
+ BlockPredicateInfo* pred_info = predicate_info_map_->Get(hif->GetBlock());
+ pred_info->SetControlFlowInfo(vec_cond->AsVecPredSetOperation(),
+ vec_pred_not->AsVecPredSetOperation());
}
return true;
}
@@ -3140,6 +3131,7 @@ void HLoopOptimization::InitPredicateInfoMap(LoopNode* node,
return;
}
}
+ LOG(FATAL) << "Unreachable";
UNREACHABLE();
}