]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Remove redundant check of better_main_loop_than_p in COST model
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Fri, 8 Dec 2023 06:33:22 +0000 (14:33 +0800)
committerLehua Ding <lehua.ding@rivai.ai>
Fri, 8 Dec 2023 06:43:19 +0000 (14:43 +0800)
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

index 8036c9c40d751a3544d7c766765f5d8a10ad2b5b..c062c12a263373875b3977ccd9afc2f5c8fbb40d 100644 (file)
@@ -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);