From ed79a5ea4b490cd4d3d8ae849126efaee38061b9 Mon Sep 17 00:00:00 2001 From: blunce Date: Tue, 17 Jun 2025 18:17:46 +0800 Subject: [PATCH] [Sync] Sync patches from openeuler/gcc. (cherry picked from commit e2e99351b93818f03e10cb0b4d0aec6fd9b59c06) --- 0394-SVE-Add-SVE-constraint.patch | 36 +++++++++++++++++++++++++++++++ gcc.spec | 8 ++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0394-SVE-Add-SVE-constraint.patch diff --git a/0394-SVE-Add-SVE-constraint.patch b/0394-SVE-Add-SVE-constraint.patch new file mode 100644 index 0000000..74bf50c --- /dev/null +++ b/0394-SVE-Add-SVE-constraint.patch @@ -0,0 +1,36 @@ +From 499bec4f75a9f8846e7a7f2bf7b537debb12d384 Mon Sep 17 00:00:00 2001 +From: blunce +Date: Tue, 17 Jun 2025 18:10:02 +0800 +Subject: [PATCH] [SVE] Add SVE constraint. + +--- + gcc/gimple-ssa-expand-sve.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/gcc/gimple-ssa-expand-sve.cc b/gcc/gimple-ssa-expand-sve.cc +index bd7f88cfa..12f5fe3ab 100644 +--- a/gcc/gimple-ssa-expand-sve.cc ++++ b/gcc/gimple-ssa-expand-sve.cc +@@ -35,6 +35,9 @@ along with GCC; see the file COPYING3. If not see + #include "cfgloop.h" + #include "gimple-ssa.h" + #include "gimple-pretty-print.h" ++#ifdef __aarch64__ ++#include "config/aarch64/aarch64.h" ++#endif + + namespace { + +@@ -95,6 +98,9 @@ public: + if (!flag_find_with_sve) + return false; + ++ if (!TARGET_SVE) ++ return false; ++ + if (!targetm.vector_mode_supported_p (V2DImode)) + return false; + +-- +2.28.0.windows.1 + diff --git a/gcc.spec b/gcc.spec index 90ab707..311ebe7 100644 --- a/gcc.spec +++ b/gcc.spec @@ -2,7 +2,7 @@ %global gcc_major 12 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 94 +%global gcc_release 95 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 @@ -503,6 +503,7 @@ Patch390: 0390-struct-reorg-Check-ADDR_EXPR-in-pointer-plus-assign.patch Patch391: 0391-oeAware-Fix-.GCC4OE_oeAware-section-dup-in-LTO.patch Patch392: 0392-Modify-cores-definition-for-hip-cores.patch Patch393: 0393-array-dse-Ignore-debug-stmt-add-testsuites.patch +Patch394: 0394-SVE-Add-SVE-constraint.patch # Part 1001-1999 %ifarch sw_64 @@ -1682,6 +1683,7 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch -P391 -p1 %patch -P392 -p1 %patch -P393 -p1 +%patch -P394 -p1 %ifarch sw_64 %patch -P1001 -p1 @@ -4309,6 +4311,10 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Tue Jun 17 2025 zhangjingwang - 12.3.1-95 +- Type: Sync +- DESC: Sync patches from openeuler/gcc. + * Tue Jun 17 2025 huzife <634763349@qq.com> - 12.3.1-94 - Type: Sync - DESC: Sync patches from openeuler/gcc. -- Gitee