[Committed] RISC-V: Remove redundant check of better_main_loop_than_p in COST model

Message ID 20231208063510.1806832-1-juzhe.zhong@rivai.ai
State Unresolved
Headers
Series [Committed] RISC-V: Remove redundant check of better_main_loop_than_p in COST model |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

juzhe.zhong@rivai.ai Dec. 8, 2023, 6:35 a.m. UTC
  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(-)
  

Patch

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);