diff --git a/0161-Fix-lost-ftree-fold-phiopt-option-in-tests.patch b/0161-Fix-lost-ftree-fold-phiopt-option-in-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..e87ac76be51c7e79de738fdcda20fb14951bf1b5 --- /dev/null +++ b/0161-Fix-lost-ftree-fold-phiopt-option-in-tests.patch @@ -0,0 +1,51 @@ +From 885c6fbfa6412a81740a8c806fa82273b7114b24 Mon Sep 17 00:00:00 2001 +From: Pronin Alexander 00812787 +Date: Wed, 13 Dec 2023 18:38:33 +0800 +Subject: [PATCH 1/2] Fix lost ftree-fold-phiopt option in tests + +--- + gcc/testsuite/gcc.dg/double_sized_mul-1.c | 2 +- + gcc/testsuite/gcc.dg/double_sized_mul-2.c | 2 +- + gcc/testsuite/gcc.dg/ifcvt-gimple.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gcc/testsuite/gcc.dg/double_sized_mul-1.c b/gcc/testsuite/gcc.dg/double_sized_mul-1.c +index 4d475cc8a..bdb503bc4 100644 +--- a/gcc/testsuite/gcc.dg/double_sized_mul-1.c ++++ b/gcc/testsuite/gcc.dg/double_sized_mul-1.c +@@ -1,7 +1,7 @@ + /* { dg-do compile } */ + /* fif-conversion-gimple and fuaddsub-overflow-match-all are required for + proper overflow detection in some cases. */ +-/* { dg-options "-O2 -fif-conversion-gimple -fuaddsub-overflow-match-all -fdump-tree-widening_mul-stats" } */ ++/* { dg-options "-O2 -fif-conversion-gimple -fuaddsub-overflow-match-all -ftree-fold-phiopt -fdump-tree-widening_mul-stats" } */ + #include + + typedef unsigned __int128 uint128_t; +diff --git a/gcc/testsuite/gcc.dg/double_sized_mul-2.c b/gcc/testsuite/gcc.dg/double_sized_mul-2.c +index cc6e5af25..f9d58a2f6 100644 +--- a/gcc/testsuite/gcc.dg/double_sized_mul-2.c ++++ b/gcc/testsuite/gcc.dg/double_sized_mul-2.c +@@ -1,7 +1,7 @@ + /* { dg-do compile } */ + /* fif-conversion-gimple is required for proper overflow detection + in some cases. */ +-/* { dg-options "-O2 -fif-conversion-gimple -fuaddsub-overflow-match-all -fdump-tree-widening_mul-stats" } */ ++/* { dg-options "-O2 -fif-conversion-gimple -fuaddsub-overflow-match-all -ftree-fold-phiopt -fdump-tree-widening_mul-stats" } */ + #include + + typedef unsigned __int128 uint128_t; +diff --git a/gcc/testsuite/gcc.dg/ifcvt-gimple.c b/gcc/testsuite/gcc.dg/ifcvt-gimple.c +index 0f7c87e5c..4dc0f9206 100644 +--- a/gcc/testsuite/gcc.dg/ifcvt-gimple.c ++++ b/gcc/testsuite/gcc.dg/ifcvt-gimple.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fif-conversion-gimple -fdump-tree-optimized" } */ ++/* { dg-options "-O2 -fif-conversion-gimple -fdump-tree-optimized -ftree-fold-phiopt" } */ + + int test_int (int optimizable_int) { + if (optimizable_int > 5) +-- +2.33.0 + diff --git a/0162-rtl-ifcvt-free-dominance-info-before-cleanup_cfg.patch b/0162-rtl-ifcvt-free-dominance-info-before-cleanup_cfg.patch new file mode 100644 index 0000000000000000000000000000000000000000..4faec3c6a703d4ea9e2ade0a642d2419a7f505f8 --- /dev/null +++ b/0162-rtl-ifcvt-free-dominance-info-before-cleanup_cfg.patch @@ -0,0 +1,25 @@ +From 126bd5722f96733e7fbe433062861d5c3534911a Mon Sep 17 00:00:00 2001 +From: vchernon +Date: Wed, 13 Dec 2023 21:52:03 +0800 +Subject: [PATCH 2/2] [rtl-ifcvt] free dominance info before cleanup_cfg not + cleaned dominance info can cause infite loop in cleanup_cfg + +--- + gcc/ifcvt.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c +index 209987ebc..04086c560 100644 +--- a/gcc/ifcvt.c ++++ b/gcc/ifcvt.c +@@ -5624,6 +5624,7 @@ if_convert (bool after_combine) + df_live_add_problem (); + df_live_set_all_dirty (); + } ++ free_dominance_info (CDI_DOMINATORS); + cleanup_cfg (CLEANUP_EXPENSIVE); + + /* Record whether we are after combine pass. */ +-- +2.33.0 + diff --git a/gcc.spec b/gcc.spec index 4daa3c4accdafb674521ed08dec57baafacc33d1..3e5bebfd40c5a52cdf833e617ae1fd84989b25ee 100644 --- a/gcc.spec +++ b/gcc.spec @@ -61,7 +61,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: 43 +Release: 44 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL: https://gcc.gnu.org @@ -268,6 +268,8 @@ Patch157: 0157-Add-split-complex-instructions-pass.patch Patch158: 0158-Implement-IPA-prefetch-optimization.patch Patch159: 0159-Implement-AES-pattern-matching.patch Patch160: 0160-AES-Add-lost-files.patch +Patch161: 0161-Fix-lost-ftree-fold-phiopt-option-in-tests.patch +Patch162: 0162-rtl-ifcvt-free-dominance-info-before-cleanup_cfg.patch %global gcc_target_platform %{_arch}-linux-gnu @@ -881,6 +883,8 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch158 -p1 %patch159 -p1 %patch160 -p1 +%patch161 -p1 +%patch162 -p1 %build @@ -2905,6 +2909,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Fri Dec 15 2023 Xiong Zhou - 10.3.1-44 +- Type:Sync +- ID:NA +- SUG:NA +- DESC: Sync patches from openeuler/gcc + * Tue Dec 12 2023 Xiong Zhou - 10.3.1-43 - Type:Spec - ID:NA