Since loop vectorizer won't call better_main_loop_than_p if 
!flag_vect_cost_model.

Committed as it is obvious.

gcc/ChangeLog:

        * config/riscv/riscv-vector-costs.cc (costs::better_main_loop_than_p): 
Remove redundant check.

---
 gcc/config/riscv/riscv-vector-costs.cc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/gcc/config/riscv/riscv-vector-costs.cc 
b/gcc/config/riscv/riscv-vector-costs.cc
index 8036c9c40d7..c062c12a263 100644
--- a/gcc/config/riscv/riscv-vector-costs.cc
+++ b/gcc/config/riscv/riscv-vector-costs.cc
@@ -630,9 +630,6 @@ costs::better_main_loop_than_p (const vector_costs 
*uncast_other) const
 {
   auto other = static_cast<const costs *> (uncast_other);
 
-  if (!flag_vect_cost_model)
-    return vector_costs::better_main_loop_than_p (other);
-
   if (riscv_autovec_lmul == RVV_DYNAMIC)
     {
       bool post_dom_available_p = dom_info_available_p (CDI_POST_DOMINATORS);
-- 
2.36.3

Reply via email to