Open
hygon/nt-store #749
optivexAdd on 21 days ago
hygon/nt-store #749
Open
Total: 3 files changed+1112-1
| @@ -0,0 +1,88 @@ | |||
| 1 | +From 6c871ee0e14ce025d21090b0d4486b416fa6222a Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: Xiaomei Xue <xuexiaomei@hygon.cn> | ||
| 3 | +Date: Fri, 16 Oct 2026 19:29:07 +0800 | ||
| 4 | +Subject: [PATCH] i386: Extend MOVNTDQ support to cover various packed integer | ||
| 5 | + types | ||
| 6 | + | ||
| 7 | +Reference: https://gcc.gnu.org/cgit/gcc/commit/?id=41d7bf31278cc166d9a3b4073da09afbaef78fc4 | ||
| 8 | +Prerequisite reference: https://gcc.gnu.org/cgit/gcc/commit/?id=2e51fff7ce02a6105aa1acff57cbbdd8a767a33f | ||
| 9 | + | ||
| 10 | +Extend the MOVNTDQ and storent patterns to support packed QI, HI and SI | ||
| 11 | +integer modes in addition to the existing DI modes. | ||
| 12 | + | ||
| 13 | +This GCC 12 branch does not define VI_AVX_AVX512F, so import the | ||
| 14 | +mode iterator from trunk. | ||
| 15 | + | ||
| 16 | +gcc/ChangeLog: | ||
| 17 | + | ||
| 18 | + * config/i386/sse.md (VI_AVX_AVX512F): New mode iterator, | ||
| 19 | + partially backported from 2e51fff7ce02 with GCC 12 conditions. | ||
| 20 | + (sse2): Add V4SI/V8SI/V16SI/V8HI/V16HI/V32HI. | ||
| 21 | + (<sse2>_movnt<mode>): Change mode iterator from VI8 to | ||
| 22 | + VI_AVX_AVX512F. | ||
| 23 | + (STORENT_MODE): Add V4SI/V8SI/V16SI/V8HI/V16HI/V32HI/V16QI/ | ||
| 24 | + V32QI/V64QI. | ||
| 25 | + | ||
| 26 | +Signed-off-by: Xiaomei Xue <xuexiaomei@hygon.cn> | ||
| 27 | +--- | ||
| 28 | + gcc/config/i386/sse.md | 22 +++++++++++++++++----- | ||
| 29 | + 1 file changed, 17 insertions(+), 5 deletions(-) | ||
| 30 | + | ||
| 31 | +diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md | ||
| 32 | +index 1a92cd62d..8af12f4b9 100644 | ||
| 33 | +--- a/gcc/config/i386/sse.md | ||
| 34 | ++++ b/gcc/config/i386/sse.md | ||
| 35 | +@@ -460,6 +460,12 @@ | ||
| 36 | + (V16SI "TARGET_AVX512F") (V8SI "TARGET_AVX2") V4SI | ||
| 37 | + (V8DI "TARGET_AVX512F") (V4DI "TARGET_AVX2") V2DI]) | ||
| 38 | + | ||
| 39 | ++(define_mode_iterator VI_AVX_AVX512F | ||
| 40 | ++ [(V64QI "TARGET_AVX512F") (V32QI "TARGET_AVX") V16QI | ||
| 41 | ++ (V32HI "TARGET_AVX512F") (V16HI "TARGET_AVX") V8HI | ||
| 42 | ++ (V16SI "TARGET_AVX512F") (V8SI "TARGET_AVX") V4SI | ||
| 43 | ++ (V8DI "TARGET_AVX512F") (V4DI "TARGET_AVX") V2DI]) | ||
| 44 | ++ | ||
| 45 | + ;; All QImode vector integer modes | ||
| 46 | + (define_mode_iterator VI1 | ||
| 47 | + [(V32QI "TARGET_AVX") V16QI]) | ||
| 48 | +@@ -881,6 +887,8 @@ | ||
| 49 | + | ||
| 50 | + (define_mode_attr sse2 | ||
| 51 | + [(V16QI "sse2") (V32QI "avx") (V64QI "avx512f") | ||
| 52 | ++ (V8HI "sse2") (V16HI "avx") (V32HI "avx512f") | ||
| 53 | ++ (V4SI "sse2") (V8SI "avx") (V16SI "avx512f") | ||
| 54 | + (V2DI "sse2") (V4DI "avx") (V8DI "avx512f")]) | ||
| 55 | + | ||
| 56 | + (define_mode_attr sse3 | ||
| 57 | +@@ -1786,9 +1794,10 @@ | ||
| 58 | + (set_attr "mode" "<MODE>")]) | ||
| 59 | + | ||
| 60 | + (define_insn "<sse2>_movnt<mode>" | ||
| 61 | +- [(set (match_operand:VI8 0 "memory_operand" "=m") | ||
| 62 | +- (unspec:VI8 [(match_operand:VI8 1 "register_operand" "v")] | ||
| 63 | +- UNSPEC_MOVNT))] | ||
| 64 | ++ [(set (match_operand:VI_AVX_AVX512F 0 "memory_operand" "=m") | ||
| 65 | ++ (unspec:VI_AVX_AVX512F | ||
| 66 | ++ [(match_operand:VI_AVX_AVX512F 1 "register_operand" "v")] | ||
| 67 | ++ UNSPEC_MOVNT))] | ||
| 68 | + "TARGET_SSE2" | ||
| 69 | + "%vmovntdq\t{%1, %0|%0, %1}" | ||
| 70 | + [(set_attr "type" "ssecvt") | ||
| 71 | +@@ -1809,9 +1818,12 @@ | ||
| 72 | + (define_mode_iterator STORENT_MODE | ||
| 73 | + [(DI "TARGET_SSE2 && TARGET_64BIT") (SI "TARGET_SSE2") | ||
| 74 | + (SF "TARGET_SSE4A") (DF "TARGET_SSE4A") | ||
| 75 | +- (V8DI "TARGET_AVX512F") (V4DI "TARGET_AVX") (V2DI "TARGET_SSE2") | ||
| 76 | + (V16SF "TARGET_AVX512F") (V8SF "TARGET_AVX") V4SF | ||
| 77 | +- (V8DF "TARGET_AVX512F") (V4DF "TARGET_AVX") (V2DF "TARGET_SSE2")]) | ||
| 78 | ++ (V8DF "TARGET_AVX512F") (V4DF "TARGET_AVX") (V2DF "TARGET_SSE2") | ||
| 79 | ++ (V8DI "TARGET_AVX512F") (V4DI "TARGET_AVX") (V2DI "TARGET_SSE2") | ||
| 80 | ++ (V16SI "TARGET_AVX512F") (V8SI "TARGET_AVX") (V4SI "TARGET_SSE2") | ||
| 81 | ++ (V32HI "TARGET_AVX512F") (V16HI "TARGET_AVX") (V8HI "TARGET_SSE2") | ||
| 82 | ++ (V64QI "TARGET_AVX512F") (V32QI "TARGET_AVX") (V16QI "TARGET_SSE2")]) | ||
| 83 | + | ||
| 84 | + (define_expand "storent<mode>" | ||
| 85 | + [(set (match_operand:STORENT_MODE 0 "memory_operand") | ||
| 86 | +-- | ||
| 87 | +2.34.1 | ||
| 88 | + | ||
| @@ -2,7 +2,7 @@ | |||
| 2 | %global gcc_major 12 | 2 | %global gcc_major 12 |
| 3 | # Note, gcc_release must be integer, if you want to add suffixes to | 3 | # Note, gcc_release must be integer, if you want to add suffixes to |
| 4 | # %%{release}, append them after %%{gcc_release} on Release: line. | 4 | # %%{release}, append them after %%{gcc_release} on Release: line. |
| 5 | -%global gcc_release 116 | 5 | +%global gcc_release 118 |
| 6 | 6 | ||
| 7 | %global _unpackaged_files_terminate_build 0 | 7 | %global _unpackaged_files_terminate_build 0 |
| 8 | %global _performance_build 1 | 8 | %global _performance_build 1 |
| @@ -540,6 +540,8 @@ Patch427: 0427-Backport-i386-Fix-some-c86-4g-m7-reservations.patch | |||
| 540 | Patch428: 0428-Backport-i386-Adjust-c86-4g-m7-512-bit-memory-costs.patch | 540 | Patch428: 0428-Backport-i386-Adjust-c86-4g-m7-512-bit-memory-costs.patch |
| 541 | Patch429: 0429-Backport-i386-Add-HYGON-c86-4g-m8-support.patch | 541 | Patch429: 0429-Backport-i386-Add-HYGON-c86-4g-m8-support.patch |
| 542 | Patch430: 0430-Backport-AArch64-SVE-memcpy-and-memset-expansion.patch | 542 | Patch430: 0430-Backport-AArch64-SVE-memcpy-and-memset-expansion.patch |
| 543 | +Patch431: 0431-Backport-i386-Extend-MOVNTDQ-support.patch | ||
| 544 | +Patch432: 0432-Add-non-temporal-store-optimization.patch | ||
| 543 | 545 | ||
| 544 | # Part 1001-1999 | 546 | # Part 1001-1999 |
| 545 | Patch1001: 0001-Sw64-Port-add-configure-support-for-sw64.patch | 547 | Patch1001: 0001-Sw64-Port-add-configure-support-for-sw64.patch |
| @@ -1843,6 +1845,8 @@ not stable, so plugins must be rebuilt any time GCC is updated. | |||
| 1843 | %patch -P428 -p1 | 1845 | %patch -P428 -p1 |
| 1844 | %patch -P429 -p1 | 1846 | %patch -P429 -p1 |
| 1845 | %patch -P430 -p1 | 1847 | %patch -P430 -p1 |
| 1848 | +%patch -P431 -p1 | ||
| 1849 | +%patch -P432 -p1 | ||
| 1846 | 1850 | ||
| 1847 | %ifarch sw_64 | 1851 | %ifarch sw_64 |
| 1848 | %patch -P1001 -p1 | 1852 | %patch -P1001 -p1 |
| @@ -4559,6 +4563,14 @@ end | |||
| 4559 | %doc rpm.doc/changelogs/libcc1/ChangeLog* | 4563 | %doc rpm.doc/changelogs/libcc1/ChangeLog* |
| 4560 | 4564 | ||
| 4561 | %changelog | 4565 | %changelog |
| 4566 | +* Fri Oct 16 2026 Xiaomei Xue <xuexiaomei@hygon.cn> - 12.3.1-118 | ||
| 4567 | +- Type: Sync | ||
| 4568 | +- DESC: Sync patch from openeuler/gcc for non-temporal store optimization | ||
| 4569 | + | ||
| 4570 | +* Fri Oct 16 2026 Xiaomei Xue <xuexiaomei@hygon.cn> - 12.3.1-117 | ||
| 4571 | +- Type: Sync | ||
| 4572 | +- DESC: Sync patch from openeuler/gcc to extend MOVNTDQ support | ||
| 4573 | + | ||
| 4562 | * Sun Sep 06 2026 shupiaoyang <shupiaoyang1@huawei.com> - 12.3.1-116 | 4574 | * Sun Sep 06 2026 shupiaoyang <shupiaoyang1@huawei.com> - 12.3.1-116 |
| 4563 | - Keep LoongArch patches in source packages built on all architectures. | 4575 | - Keep LoongArch patches in source packages built on all architectures. |
| 4564 | 4576 | ||