From 8820a86edd27038cbed382273863c26164e3e703 Mon Sep 17 00:00:00 2001 From: lhz Date: Tue, 18 Nov 2025 16:07:41 +0800 Subject: [PATCH] Fix hip12_vector_cost --- SOURCES/gcc8-fix-hip12-vector-cost.patch | 22 ++++++++++++++++++++++ SPECS/gcc.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 SOURCES/gcc8-fix-hip12-vector-cost.patch diff --git a/SOURCES/gcc8-fix-hip12-vector-cost.patch b/SOURCES/gcc8-fix-hip12-vector-cost.patch new file mode 100644 index 0000000..e751875 --- /dev/null +++ b/SOURCES/gcc8-fix-hip12-vector-cost.patch @@ -0,0 +1,22 @@ +diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c +index 2cf129269..c10d91d54 100644 +--- a/gcc/config/aarch64/aarch64.c ++++ b/gcc/config/aarch64/aarch64.c +@@ -545,7 +545,7 @@ static const struct cpu_vector_cost hip12_vector_cost = + 1, /* scalar_store_cost */ + 2, /* vec_int_stmt_cost */ + 2, /* vec_fp_stmt_cost */ +- 2, /* vec_permute_cost */ ++ 6, /* vec_permute_cost */ + 2, /* vec_to_scalar_cost */ + 5, /* scalar_to_vec_cost */ + 8, /* vec_align_load_cost */ +@@ -565,7 +565,7 @@ static const struct cpu_vector_cost cortexa57_vector_cost = + 1, /* scalar_store_cost */ + 2, /* vec_int_stmt_cost */ + 2, /* vec_fp_stmt_cost */ +- 6, /* vec_permute_cost */ ++ 3, /* vec_permute_cost */ + 8, /* vec_to_scalar_cost */ + 8, /* scalar_to_vec_cost */ + 4, /* vec_align_load_cost */ diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index 1c402dc..950a57f 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -105,7 +105,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}%{?dist}.ap.2 +Release: %{gcc_release}%{?dist}.ap.3 # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD @@ -337,6 +337,7 @@ Patch5011: gcc8-fix-build-error.patch Patch5012: gcc8-Improve-non-loop-disambiguation.patch Patch5013: gcc8-fix-model-param-reading-bug.patch Patch5014: gcc8-loop-opt.patch +Patch5015: gcc8-fix-hip12-vector-cost.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -980,6 +981,7 @@ so that there cannot be any synchronization problems. %patch5012 -p1 -b .Improve-non-loop~ %patch5013 -p1 -b .fix-model-param~ %patch5014 -p1 -b .loop-opt~ +%patch5015 -p1 -b .fix-hip12-vector-cost~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch2000 -p1 -b .nvptx-tools-no-ptxas~ @@ -3394,6 +3396,9 @@ fi %{ANNOBIN_GCC_PLUGIN_DIR}/gcc-annobin.so.0.0.0 %changelog +* Tue Nov 18 2025 linhouzhong - 8.5.0-28.ap.3 +- Fix hip12_vector_cost + * Mon Sep 22 2025 huzife <634763349@qq.com> - 8.5.0-28.ap.2 - Applied loop-elim optimization -- Gitee