!373 [Sync] Sync patch from openeuler/gcc.

From: @xiongzhou4 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
This commit is contained in:
openeuler-ci-bot 2023-12-21 09:08:35 +00:00 committed by Gitee
commit 5a063c83bc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 71 additions and 1 deletions

View File

@ -0,0 +1,62 @@
From bed123b58aaf435653e01692830def8d564cf51f Mon Sep 17 00:00:00 2001
From: Diachkov Ilia WX1215920 <diachkov.ilia1@huawei-partners.com>
Date: Mon, 18 Dec 2023 22:49:54 +0300
Subject: [PATCH] [perm propagation][Bugfix] Fix shll/shll2 patterns for perm
prop
---
gcc/config/aarch64/aarch64-simd.md | 8 ++++----
gcc/config/aarch64/predicates.md | 7 +++++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
index 66fcf0074..c7503561f 100644
--- a/gcc/config/aarch64/aarch64-simd.md
+++ b/gcc/config/aarch64/aarch64-simd.md
@@ -4791,10 +4791,10 @@
(vec_select:V4HI
(match_operand:V8HI 1 "register_operand" "w")
(match_operand:V8HI 2 "vect_par_cnst_lo_half" "")))
- (match_operand:V4SI 3 "aarch64_simd_rshift_imm" "Dr")))]
+ (match_operand:V4SI 3 "aarch64_simd_shift_imm_bitsize_v4si" "i")))]
"TARGET_SIMD"
"shll\t%0.4s, %1.4h, #%3"
- [(set_attr "type" "neon_compare_zero")]
+ [(set_attr "type" "neon_shift_imm_long")]
)
;; vshll_high_n
@@ -4821,10 +4821,10 @@
(vec_select:V4HI
(match_operand:V8HI 1 "register_operand" "w")
(match_operand:V8HI 2 "vect_par_cnst_hi_half" "")))
- (match_operand:V4SI 3 "aarch64_simd_rshift_imm" "Dr")))]
+ (match_operand:V4SI 3 "aarch64_simd_shift_imm_bitsize_v4si" "i")))]
"TARGET_SIMD"
"shll2\t%0.4s, %1.8h, #%3"
- [(set_attr "type" "neon_compare_zero")]
+ [(set_attr "type" "neon_shift_imm_long")]
)
;; vrshr_n
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index b1b3cf82c..90db0efba 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -618,6 +618,13 @@
(and (match_code "const_int")
(match_test "IN_RANGE (INTVAL (op), 0, 64)")))
+(define_predicate "aarch64_simd_shift_imm_bitsize_v4si"
+ (match_code "const_vector")
+{
+ HOST_WIDE_INT val = INTVAL (unwrap_const_vec_duplicate (op));
+ return val == 8 || val == 16 || val == 32;
+})
+
(define_predicate "aarch64_constant_pool_symref"
(and (match_code "symbol_ref")
(match_test "CONSTANT_POOL_ADDRESS_P (op)")))
--
2.33.0

View File

@ -61,7 +61,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
Release: 45
Release: 46
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
URL: https://gcc.gnu.org
@ -274,6 +274,7 @@ Patch163: 0163-Loop-CRC-Solving-the-problem-of-insufficient-CRC-tab.patch
Patch164: 0164-LLC-Allocation-Fix-some-bugs-and-remove-variable-pre.patch
Patch165: 0165-rtl-ifcvt-BugFix-change-def-selection-logic-in-noce_.patch
Patch166: 0166-perm-propagation-Bugfix-Check-that-the-arithmetic-op.patch
Patch167: 0167-perm-propagation-Bugfix-Fix-shll-shll2-patterns-for-.patch
%global gcc_target_platform %{_arch}-linux-gnu
@ -893,6 +894,7 @@ not stable, so plugins must be rebuilt any time GCC is updated.
%patch164 -p1
%patch165 -p1
%patch166 -p1
%patch167 -p1
%build
@ -2917,6 +2919,12 @@ end
%doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog
* Thu Dec 21 2023 Xiong Zhou <xiongzhou4@huawei.com> - 10.3.1-46
- Type:Sync
- ID:NA
- SUG:NA
- DESC: Sync patch from openeuler/gcc
* Mon Dec 18 2023 Xiong Zhou <xiongzhou4@huawei.com> - 10.3.1-45
- Type:Sync
- ID:NA