Re: [PATCH] s390: Fix builtins vec_rli and verll

2023-09-10 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Mon, Aug 28, 2023 at 11:33:37AM +0200, Andreas Krebbel wrote: > Hi Stefan, > > do you really need to introduce a new flag for U64 given that the type of the > builtin is unsigned long? In function s390_const_operand_ok the immediate is checked whether it is valide w.r.t. the flag: tree_to_

Re: [PATCH v3 4/9] LoongArch:Added support for SX vector floating-point instructions.

2023-09-10 Thread Xi Ruoyao via Gcc-patches
The subject should be "Add tests for SX vector floating-point instructions". The "support" has already been added. Likewise for patches 5-9. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University

[PATCH v3 7/9] LoongArch:Add vector arithmetic addition vsadd instruction.

2023-09-10 Thread Xiaolong Chen
gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lsx/lsx-vsadd-1.c: New test. * gcc.target/loongarch/vector/lsx/lsx-vsadd-2.c: New test. --- .../loongarch/vector/lsx/lsx-vsadd-1.c| 335 + .../loongarch/vector/lsx/lsx-vsadd-2.c| 345 +++

[PATCH v3 3/9] LoongArch: Add tests for Loongson SX builtin functions.

2023-09-10 Thread Xiaolong Chen
gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lsx/lsx-builtin.c: New test. --- .../loongarch/vector/lsx/lsx-builtin.c| 5038 + 1 file changed, 5038 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-builtin.c diff --git a/

[PATCH v3 1/9] LoongArch: Add tests of -mstrict-align option.

2023-09-10 Thread Xiaolong Chen
gcc/testsuite/ChangeLog: * gcc.target/loongarch/strict-align.c: New test. --- gcc/testsuite/gcc.target/loongarch/strict-align.c | 12 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/strict-align.c diff --git a/gcc/testsuite/gcc.target/

[PATCH v3 2/9] LoongArch: Add testsuite framework for Loongson SX/ASX.

2023-09-10 Thread Xiaolong Chen
gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/loongarch-vector.exp: New test. * gcc.target/loongarch/vector/simd_correctness_check.h: New test. --- .../loongarch/vector/loongarch-vector.exp | 42 +++ .../loongarch/vector/simd_correctness_check.h | 54 +

[PATCH v3 0/9] Added support for SX/LSX vector instructions.

2023-09-10 Thread Xiaolong Chen
v2 -> v3: Standardize the code using the GNU format. In order to better test the function of the vector instruction, the 128 and 256 bit test cases are further split according to the function of the instruction. Xiaolong Chen (9): LoongArch: Add tests of -mstrict-align option. LoongArch

Re: [PATCH] RISC-V: Enable RVV scalable vectorization by default[PR111311]

2023-09-10 Thread juzhe.zh...@rivai.ai
Ping this patch. I think it's time to enable scalable vectorization by default and do the whole regression every time (except vect.exp that we didn't enable yet) Update current FAILs status: Real FAILS (ICE and execution FAIL): FAIL: gcc.dg/pr70252.c (internal compiler error: in gimple_expand

[PATCH] RISC-V: Use dominance analysis in global vsetvl elimination

2023-09-10 Thread Juzhe-Zhong
I found that it's more reasonable to use existing dominance analysis. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::global_eliminate_vsetvl_insn): Use dominance analysis. (pass_vsetvl::init): Ditto. (pass_vsetvl::done): Ditto. --- gcc/config/riscv/riscv-vs

[Committed V2] RISC-V: Add VLS modes VEC_PERM support[PR111311]

2023-09-10 Thread Juzhe-Zhong
This patch add VLS modes VEC_PERM support which fix these following FAILs in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111311: FAIL: gcc.dg/tree-ssa/forwprop-40.c scan-tree-dump-times optimized "BIT_FIELD_REF" 0 FAIL: gcc.dg/tree-ssa/forwprop-40.c scan-tree-dump-times optimized "BIT_INSERT_EX

Re: Re: [PATCH] RISC-V: Add VLS modes VEC_PERM support[PR111311]

2023-09-10 Thread juzhe.zh...@rivai.ai
Sure. Thanks kito. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-09-11 10:57 To: juzhe.zh...@rivai.ai CC: gcc-patches; Kito.cheng Subject: Re: Re: [PATCH] RISC-V: Add VLS modes VEC_PERM support[PR111311] OK, but could you split this patch into two patches? pre-approved for both. On Mon, S

[Committed] RISC-V: Add missing VLS mask bool mode reg -> reg patterns

2023-09-10 Thread Juzhe-Zhong
Committed. gcc/ChangeLog: * config/riscv/autovec-vls.md (*mov_vls): New pattern. * config/riscv/vector-iterators.md: New iterator --- gcc/config/riscv/autovec-vls.md | 8 gcc/config/riscv/vector-iterators.md | 15 +++ 2 files changed, 23 insertions(+)

Re: Re: [PATCH] RISC-V: Add VLS modes VEC_PERM support[PR111311]

2023-09-10 Thread Kito Cheng via Gcc-patches
OK, but could you split this patch into two patches? pre-approved for both. On Mon, Sep 11, 2023 at 10:36 AM juzhe.zh...@rivai.ai wrote: > > >> Should we also add loads and stores as well? > >> and just make sure this is also necessary for the fix and not sneaky, > >> right? > > No, we don't nee

Re: Re: [PATCH] RISC-V: Add VLS modes VEC_PERM support[PR111311]

2023-09-10 Thread juzhe.zh...@rivai.ai
>> Should we also add loads and stores as well? >> and just make sure this is also necessary for the fix and not sneaky, right? No, we don't need loads/stores. Since this following handling codes: (define_insn_and_split "*mov_lra" [(set (match_operand:VLS_AVL_REG 0 "reg_or_mem_operand" "=vr, m,v

Re: [PATCH] MATCH: [PR111346] `X CMP MINMAX` pattern missing :c on CMP

2023-09-10 Thread Jeff Law via Gcc-patches
On 9/10/23 20:18, Andrew Pinski via Gcc-patches wrote: I noticed this while working on other MINMAX optimizations. It was hard to find a simplified testcase though because it was dependent on the ssa name versions. Adding the `:c` to cmp allows the pattern to be match for the case where minmax

Re: [PATCH] RISC-V: Add VLS modes VEC_PERM support[PR111311]

2023-09-10 Thread Kito Cheng via Gcc-patches
> diff --git a/gcc/config/riscv/autovec-vls.md b/gcc/config/riscv/autovec-vls.md > index d208b418e5f..6f48f7d6232 100644 > --- a/gcc/config/riscv/autovec-vls.md > +++ b/gcc/config/riscv/autovec-vls.md > @@ -148,6 +148,14 @@ >[(set_attr "type" "vmov") > (set_attr "mode" "")]) > > +(define_in

[PATCH] MATCH: [PR111346] `X CMP MINMAX` pattern missing :c on CMP

2023-09-10 Thread Andrew Pinski via Gcc-patches
I noticed this while working on other MINMAX optimizations. It was hard to find a simplified testcase though because it was dependent on the ssa name versions. Adding the `:c` to cmp allows the pattern to be match for the case where minmax as the first operand of the comparison rather than the seco

Re: [PATCH] analyzer: implement symbolic value support for CPython plugin's refcnt checker [PR107646]

2023-09-10 Thread Eric Feng via Gcc-patches
On Thu, Sep 7, 2023 at 1:28 PM David Malcolm wrote: > On Mon, 2023-09-04 at 22:13 -0400, Eric Feng wrote: > > > Hi Dave, > > Hi Eric, thanks for the patch. > > > > > Recently I've been working on symbolic value support for the reference > > count checker. I've attached a patch for it below; let m

[PATCH] Remove constraint modifier % for fcmaddcph/fmaddcph/fcmulcph since there're not commutative.

2023-09-10 Thread liuhongt via Gcc-patches
Here's the patch I've commited. The patch also remove % for vfmaddcph. gcc/ChangeLog: PR target/111306 PR target/111335 * config/i386/sse.md (int_comm): New int_attr. (fma__): Remove % for Complex conjugate operations since they're not commutative.

RE: [PATCH] RISC-V: Expand fixed-vlmax/vls vector permutation in targethook

2023-09-10 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, September 10, 2023 9:38 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@sifive.com; kito.ch...@gmail.com Subject: Re: [PATCH] RISC-V: Expand fixed-vlmax/vls v

RE: [PATCH V2] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm

2023-09-10 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, September 10, 2023 11:25 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@sifive.com; kito.ch...@gmail.com Subject: Re: [PATCH V2] RISC-V: Avoid unnecessary sl

[PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-10 Thread Christophe Lyon via Gcc-patches
Some targets like arm-eabi with newlib and default settings rely on __sync_synchronize() to ensure synchronization. Newlib does not implement it by default, to make users aware they have to take special care. This makes a few tests fail to link. This patch requires the missing thread-fence effec

[PATCH 1/2] testsuite: Add and use thread_fence effective-target

2023-09-10 Thread Christophe Lyon via Gcc-patches
Some targets like arm-eabi with newlib and default settings rely on __sync_synchronize() to ensure synchronization. Newlib does not implement it by default, to make users aware they have to take special care. This makes a few tests fail to link. This patch adds a new thread_fence effective targe

[PATCH v2] swap: Fix incorrect lane extraction by vec_extract() [PR106770]

2023-09-10 Thread Surya Kumari Jangala via Gcc-patches
swap: Fix incorrect lane extraction by vec_extract() [PR106770] In the routine rs6000_analyze_swaps(), special handling of swappable instructions is done even if the webs that contain the swappable instructions are not optimized, i.e., the webs do not contain any permuting load/store instructions

PING^4: [PATCH] rtl-optimization/110939 Really fix narrow comparison of memory and constant

2023-09-10 Thread Xi Ruoyao via Gcc-patches
Ping. > > > On Thu, Aug 10, 2023 at 03:04:03PM +0200, Stefan Schulze Frielinghaus > > > wrote: > > > > In the former fix in commit 41ef5a34161356817807be3a2e51fbdbe575ae85 I > > > > completely missed the fact that the normal form of a generated constant > > > > for a > > > > mode with fewer bits

Re: [PATCH] Fix PR 111331: wrong code for `a > 28 ? MIN : 29`

2023-09-10 Thread Jeff Law via Gcc-patches
On 9/8/23 06:39, Andrew Pinski via Gcc-patches wrote: The problem here is after r6-7425-ga9fee7cdc3c62d0e51730, the comparison to see if the transformation could be done was using the wrong value. Instead of see if the inner was LE (for MIN and GE for MAX) the outer value, it was comparing the

Re: [PATCH] RISC-V Add Types to Un-Typed Thead Instructions:

2023-09-10 Thread Jeff Law via Gcc-patches
On 8/31/23 11:36, Edwin Lu wrote: Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the THEAD instructions to ensure that no insn is left without a type attribute. Tested for regressions using rv32/64 multilib for

Re: [PATCH] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 [PR 111050]

2023-09-10 Thread Sam James via Gcc-patches
François Dumont via Gcc-patches writes: > Following confirmation of the fix by TC here is the patch where I'm > simply adding a 'constexpr' on _M_next(). > > Please let me know this ChangeLog entry is correct. I would prefer > this patch to be assigned to 'TC' with me as co-author but I don't >

Re: [PATCH V2] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm

2023-09-10 Thread Jeff Law via Gcc-patches
On 9/10/23 08:07, Juzhe-Zhong wrote: gcc/ChangeLog: * config/riscv/riscv-v.cc (shuffle_compress_patterns): Avoid unnecessary slideup. OK jeff

Re: Re: [PATCH] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm

2023-09-10 Thread 钟居哲
Address comment: [PATCH V2] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm (gnu.org) juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-09-10 21:34 To: Juzhe-Zhong; gcc-patches CC: kito.cheng; kito.cheng; rdapp.gcc Subject: Re: [PATCH] RISC-V: Avoid unnecessary slideup in compr

[pushed] Darwin: Partial reversion of r14-3648 (Inits Section).

2023-09-10 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21 and i686-darwin9 with both dwarfutils and llvm-based dsymutil implementations. Pushed to trunk, thanks Iain --- 8< --- Although the Darwin ABI places both hot and cold partitions in the same section (the linker can partition by name), this does not work with the current

Re: [PATCH V2] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm

2023-09-10 Thread 钟居哲
Address comment: [PATCH V2] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm (gnu.org) juzhe.zh...@rivai.ai From: Juzhe-Zhong Date: 2023-09-10 22:07 To: gcc-patches CC: kito.cheng; kito.cheng; jeffreyalaw; rdapp.gcc; Juzhe-Zhong Subject: [PATCH V2] RISC-V: Avoid unnecessary s

[PATCH V2] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm

2023-09-10 Thread Juzhe-Zhong
gcc/ChangeLog: * config/riscv/riscv-v.cc (shuffle_compress_patterns): Avoid unnecessary slideup. --- gcc/config/riscv/riscv-v.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc index bee60de1d26..3cd1f61de0e

[PATCH] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 [PR 111050]

2023-09-10 Thread François Dumont via Gcc-patches
Following confirmation of the fix by TC here is the patch where I'm simply adding a 'constexpr' on _M_next(). Please let me know this ChangeLog entry is correct. I would prefer this patch to be assigned to 'TC' with me as co-author but I don't know how to do such a thing. Unless I need to chan

Re: [PATCH] RISC-V: Expand fixed-vlmax/vls vector permutation in targethook

2023-09-10 Thread Jeff Law via Gcc-patches
On 9/9/23 20:33, Juzhe-Zhong wrote: When debugging FAIL: gcc.dg/pr92301.c execution test. Realize a vls vector permutation situation failed to vectorize since early return false: - /* For constant size indices, we dont't need to handle it here. - Just leave it to vec_perm. */ - if (d-

Re: [PATCH] RISC-V: Avoid unnecessary slideup in compress pattern of vec_perm

2023-09-10 Thread Jeff Law via Gcc-patches
On 9/9/23 21:55, Juzhe-Zhong wrote: If a const vector all elements are same, the slide up is unnecessary. gcc/ChangeLog: * config/riscv/riscv-v.cc (shuffle_compress_patterns): Avoid unnecessary slideup. --- gcc/config/riscv/riscv-v.cc | 2 +- 1 file changed, 1 insertion(+), 1 de

[C PATCH 1/6 v2] c: reorganize recursive type checking

2023-09-10 Thread Martin Uecker via Gcc-patches
Thanks Joseph, below is a a revised version of this patch with slight additional changes to the comment of tagged_types_tu_compatible_p. ok for trunk? Martin Am Mittwoch, dem 06.09.2023 um 20:59 + schrieb Joseph Myers: > On Sat, 26 Aug 2023, Martin Uecker via Gcc-patches wrote: > > > -st