53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
From 8f5c12954adb237685c837cb37c98b7594e9fa61 Mon Sep 17 00:00:00 2001
|
|
From: Mingchuan Wu <wumingchuan1992@foxmail.com>
|
|
Date: Tue, 10 Dec 2024 15:50:16 +0800
|
|
Subject: [PATCH] [bugfix] fix vector costs for hip09.
|
|
|
|
---
|
|
gcc/config/aarch64/aarch64-cost-tables.h | 6 +++++-
|
|
gcc/config/aarch64/aarch64.cc | 4 +++-
|
|
2 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/gcc/config/aarch64/aarch64-cost-tables.h b/gcc/config/aarch64/aarch64-cost-tables.h
|
|
index dc51d9c2c..06da1b271 100644
|
|
--- a/gcc/config/aarch64/aarch64-cost-tables.h
|
|
+++ b/gcc/config/aarch64/aarch64-cost-tables.h
|
|
@@ -872,7 +872,11 @@ const struct cpu_cost_table hip09_extra_costs =
|
|
},
|
|
/* Vector */
|
|
{
|
|
- COSTS_N_INSNS (1) /* alu. */
|
|
+ COSTS_N_INSNS (1), /* alu. */
|
|
+ COSTS_N_INSNS (4), /* mult. */
|
|
+ COSTS_N_INSNS (1), /* movi. */
|
|
+ COSTS_N_INSNS (2), /* dup. */
|
|
+ COSTS_N_INSNS (2) /* extract. */
|
|
}
|
|
};
|
|
|
|
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
|
|
index 829e0da8f..f2444a039 100644
|
|
--- a/gcc/config/aarch64/aarch64.cc
|
|
+++ b/gcc/config/aarch64/aarch64.cc
|
|
@@ -499,6 +499,8 @@ static const struct cpu_addrcost_table hip09_addrcost_table =
|
|
},
|
|
0, /* pre_modify */
|
|
0, /* post_modify */
|
|
+ 0, /* post_modify_ld3_st3 */
|
|
+ 0, /* post_modify_ld4_st4 */
|
|
0, /* register_offset */
|
|
1, /* register_sextend */
|
|
1, /* register_zextend */
|
|
@@ -1910,7 +1912,7 @@ static const struct tune_params hip09_tunings =
|
|
&hip09_extra_costs,
|
|
&hip09_addrcost_table,
|
|
&hip09_regmove_cost,
|
|
- &hip09_vector_cost,
|
|
+ &generic_vector_cost,
|
|
&generic_branch_cost,
|
|
&generic_approx_modes,
|
|
SVE_256, /* sve_width */
|
|
--
|
|
2.33.0
|
|
|