Re: [PATCH V4] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-14 Thread Richard Biener via Gcc-patches
On Tue, 15 Aug 2023, Kewen.Lin wrote: > Hi Stefan, > > on 2023/8/15 02:51, Stefan Schulze Frielinghaus wrote: > > Hi everyone, > > > > I have bootstrapped and regtested the patch below on s390. For the > > 64-bit target I do not see any changes regarding the testsuite. For the > > 31-bit targe

[PATCH v1] RISC-V: Support RVV VFCVT.F.X.V and VFCVT.F.XU.V rounding mode intrinsic API

2023-08-14 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFCVT.F.X.V and VFCVT.F.XU.V as the below samples. * __riscv_vfcvt_f_x_v_f32m1_rm * __riscv_vfcvt_f_x_v_f32m1_rm_m * __riscv_vfcvt_f_xu_v_f32m1_rm * __riscv_vfcvt_f_xu_v_f32m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog:

Re: [PATCH] Generate vmovapd instead of vmovsd for moving DFmode between SSE_REGS.

2023-08-14 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 14, 2023 at 4:46 AM liuhongt via Gcc-patches wrote: > > vmovapd can enable register renaming and have same code size as > vmovsd. Similar for vmovsh vs vmovaps, vmovaps is 1 byte less than > vmovsh. > > When TARGET_AVX512VL is not available, still generate > vmovsd/vmovss/vmovsh to avo

Re: [PATCH V4] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-14 Thread Kewen.Lin via Gcc-patches
Hi Stefan, on 2023/8/15 02:51, Stefan Schulze Frielinghaus wrote: > Hi everyone, > > I have bootstrapped and regtested the patch below on s390. For the > 64-bit target I do not see any changes regarding the testsuite. For the > 31-bit target I see the following failures: > > FAIL: gcc.dg/vect/

Re: [RFC] GCC Security policy

2023-08-14 Thread Alexander Monakov
On Mon, 14 Aug 2023, Siddhesh Poyarekar wrote: > There's no practical (programmatic) way to do such validation; it has to be a > manual audit, which is why source code passed to the compiler has to be > *trusted*. No, I do not think that is a logical conclusion. What is the problem with passing

[PATCH v2] CRIS: Don't include tree.h in cris-protos.h, PR bootstrap/111021

2023-08-14 Thread Hans-Peter Nilsson via Gcc-patches
Re-testing as previously mentioned, reposted freshly for reference. -- >8 -- While there's another patch that fixes the immediate error in the PR by other means, the include of tree.h here is something I prefer to avoid. PR bootstrap/111021 * config/cris/cris-protos.h: Revert recen

Re: [PATCH] CRIS: Don't include tree.h in cris-protos.h, PR bootstrap/111021

2023-08-14 Thread Hans-Peter Nilsson via Gcc-patches
> From: Hans-Peter Nilsson > Date: Tue, 15 Aug 2023 06:57:04 +0200 Whoops, of course there was a typo due to insufficient-last-minute-renaming syndrome. :) > -#define TARGET_LEGITIMATE_ADDRESS_P cris_legitimate_address_p > +#define TARGET_LEGITIMATE_ADDRESS_P cris_target_legitimate_address_p *c

Re: [PATCH] Add clang's invalid-noreturn warning flag

2023-08-14 Thread Julian Waters via Gcc-patches
Anyone? On Sun, Aug 13, 2023 at 4:48 PM Julian Waters wrote: > Please review a patch to add clang's invalid-noreturn flag to toggle > noreturn warnings. This patch keeps the old behaviour of always warning on > every noreturn violation, but unlike clang also adds an extra layer of fine > tuning

[PATCH v1] RISC-V: Support RVV VFCVT.XU.F.V rounding mode intrinsic API

2023-08-14 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFCVT.XU.F.V as the below samples. * __riscv_vfcvt_xu_f_v_u32m1_rm * __riscv_vfcvt_xu_f_v_u32m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (vfcvt_xu_frm_ob

[PATCH] CRIS: Don't include tree.h in cris-protos.h, PR bootstrap/111021

2023-08-14 Thread Hans-Peter Nilsson via Gcc-patches
I'll commit this in a few hours pending testing. It seems trivial enough to be posted before testing is finished though, now that it has passed the previous point-of-breakage. JFTR, I'm testing against the version with the "first" breaking commit: r14-3092, not r14-3093 the one with recog.h. --

Re: IRA update_equiv_regs for (was Re: ICE for interim fix for PR/110748)

2023-08-14 Thread Jeff Law via Gcc-patches
On 8/14/23 18:35, Vineet Gupta wrote: On 8/11/23 17:04, Jeff Law wrote: I'm wondering (naively) if there is some way to tune this - for a given backend. In general it would make sense to do the replacement, but not if the cost changes (e.g. consts could be embedded in x86 insn freely, bu

Re: IRA update_equiv_regs for (was Re: ICE for interim fix for PR/110748)

2023-08-14 Thread Jeff Law via Gcc-patches
On 8/12/23 10:44, Jivan Hakobyan wrote: Yes, as mentioned Jeff I have some work in that scope. The first is related to address computation when it has a large constant part. Suppose we have this code:     int  consume (void *);     int foo (void) {        int x[1000];        return con

Re: [2/2] RISC-V: Constant FP Optimization with 'Zfa'

2023-08-14 Thread Tsukasa OI via Gcc-patches
On 2023/08/14 21:51, Jin Ma wrote: > Hi Tsukasa, > What a coincidence, I also implemented zfa extension, which also includes > fli related instructions :) Hi, I'm glad to know that someone is working on this extension more comprehensively (especially when "someone" is an experienced GCC contrib

Re: [PATCH 2/3] ivopts: Call valid_mem_ref_p with code_helper [PR110248]

2023-08-14 Thread Hans-Peter Nilsson via Gcc-patches
> Date: Mon, 14 Aug 2023 16:47:40 +0800 > From: "Kewen.Lin via Gcc-patches" > on 2023/8/14 15:53, Jan-Benedict Glaw wrote: > > echo timestamp > s-constrs-h > > /var/lib/laminar/run/gcc-local/82/local-toolchain-install/bin/g++ > > -std=c++11 -c -g -O2 -DIN_GCC-fno-exceptions -fno-rtti >

[PATCH] Makefile.in: Make recog.h depend on $(TREE_H)

2023-08-14 Thread Kewen.Lin via Gcc-patches
Hi, Commit r14-3093 introduced a random build failure on build/gencondmd.cc building. Since r14-3093 makes recog.h include tree.h, which further includes (depends on) some files that are generated during the building, such as: all-tree.def, tree-check.h etc, when building file build/gencondmd.cc,

Re: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-14 Thread juzhe.zh...@rivai.ai
For conversion API, I would prefer kito review since I am not sure about this stuff. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-08-15 10:55 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API Fr

[PATCH v1] RISC-V: Support RVV VFCVT.X.F.V rounding mode intrinsic API

2023-08-14 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFCVT.X.F.V as the below samples. * __riscv_vfcvt_x_f_v_i32m1_rm * __riscv_vfcvt_x_f_v_i32m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (class vfcvt_x_frm)

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-14 Thread Kewen.Lin via Gcc-patches
on 2023/8/14 22:16, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi Richard, >> >> on 2023/8/14 20:20, Richard Sandiford wrote: >>> Thanks for the clean-ups. But... >>> >>> "Kewen.Lin" writes: Hi, Following Richi's suggestion [1], this patch is to move the handlings on V

Re: [PATCH v1 1/6] LoongArch: a symmetric multilib subdir layout

2023-08-14 Thread Yujie Yang
> I came up with another idea. What if we: > > 1. Keep the "default" ABI libs in the toplevel directory. There is > *always* a default ABI so treating it specially is not really nonsense. > 2. Create a symlink for consistency. For example, if --with-abi=lp64d, - > -with-multilib-list=lp64d,lp64s:

RE: [PATCH v4] Mode-Switching: Fix SET_SRC ICE for create_pre_exit

2023-08-14 Thread Li, Pan2 via Gcc-patches
Committed as passed both the bootstrap and regression test in x86, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Tuesday, August 15, 2023 1:21 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re: [PATCH v4] M

RE: [PATCH] x86: Update model values for Raptorlake.

2023-08-14 Thread Cui, Lili via Gcc-patches
Sorry, I should have built the patch while backporting, and thanks for your report and suggestions. I'll backport another patch to fix the problems after finishing bootstraps, probably in couple hours. Thank you! Lili. > -Original Message- > From: Jonathan Wakely > Sent: Monday, August

RE: Bootstrap fail on GCC 13 (was: Re: [PATCH] x86: Update model values for Alderlake, Rocketlake and Raptorlake.)

2023-08-14 Thread Cui, Lili via Gcc-patches
Sorry, I should have built the patch while backporting. I'll backport another patch to fix the problems after finishing bootstraps, probably in couple hours. Thank you! Lili. > -Original Message- > From: Tobias Burnus > Sent: Monday, August 14, 2023 5:34 PM > To: gcc-patches@gcc.gnu.org

Re: [PATCH] RISC-V: Fix autovec_length_operand predicate[PR110989]

2023-08-14 Thread juzhe.zh...@rivai.ai
Ping. Seems no objection ? Will commit it soon. Thanks. juzhe.zh...@rivai.ai From: Juzhe-Zhong Date: 2023-08-12 22:15 To: gcc-patches CC: kito.cheng; kito.cheng; rdapp.gcc; jeffreyalaw; Juzhe-Zhong Subject: [PATCH] RISC-V: Fix autovec_length_operand predicate[PR110989] Currently, autovec_lengt

Re: cpymem for RISCV with v extension

2023-08-14 Thread Joern Rennecke
On Fri, 4 Aug 2023 at 21:52, Jeff Law wrote: > > diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc > > index b4884a30872..e61110fa3ad 100644 > > --- a/gcc/config/riscv/riscv-v.cc > > +++ b/gcc/config/riscv/riscv-v.cc > > @@ -49,6 +49,7 @@ > > #include "tm-constrs.h" > > #

Re: [PATCH v4 1/6] LoongArch: Add Loongson SX vector directive compilation framework.

2023-08-14 Thread PanChenghui
Yes, there's some confliction inside -mlsx/-mlasx option impl because this patch set is based on the older option framework, we will try to resolve this problem later. On Tue, 2023-08-15 at 09:18 +0800, Xi Ruoyao wrote: > I guess there is a merge conflict with Yujie's "-msimd=" patch and > you > m

Re: [PATCH v1 1/6] LoongArch: a symmetric multilib subdir layout

2023-08-14 Thread Xi Ruoyao via Gcc-patches
On Mon, 2023-08-14 at 19:16 +0800, Xi Ruoyao wrote: > On Mon, 2023-08-14 at 18:18 +0800, Yujie Yang wrote: > > On Mon, Aug 14, 2023 at 03:48:53PM +0800, Xi Ruoyao wrote: > > > On Mon, 2023-08-14 at 15:37 +0800, Yujie Yang wrote: > > > > On Mon, Aug 14, 2023 at 01:38:40PM +0800, Xi Ruoyao wrote: > >

Re: RISCV test infrastructure for d / v / zfh extensions

2023-08-14 Thread Joern Rennecke
On Tue, 1 Aug 2023 at 14:44, Robin Dapp wrote: > > Hi Joern, > > thanks, I believe this will help with testing. > > > +proc check_effective_target_riscv_v { } { > > +return [check_no_compiler_messages riscv_ext_v assembly { > > + #ifndef __riscv_v > > + #error "Not __riscv_v" > > +

Re: [PATCH v4 1/6] LoongArch: Add Loongson SX vector directive compilation framework.

2023-08-14 Thread Xi Ruoyao via Gcc-patches
I guess there is a merge conflict with Yujie's "-msimd=" patch and you may need to collaborate to resolve it. Maybe just add -msimd in this series. On Tue, 2023-08-15 at 09:05 +0800, Chenghui Pan wrote: > From: Lulu Cheng > > gcc/ChangeLog: > > * config/loongarch/genopts/loongarch-stri

Re: [PATCH v1 1/6] LoongArch: a symmetric multilib subdir layout

2023-08-14 Thread Yujie Yang
On Mon, Aug 14, 2023 at 03:48:53PM +0800, Xi Ruoyao wrote: > On Mon, 2023-08-14 at 15:37 +0800, Yujie Yang wrote: > > On Mon, Aug 14, 2023 at 01:38:40PM +0800, Xi Ruoyao wrote: > > > On Mon, 2023-08-14 at 11:57 +0800, Yang Yujie wrote: > > > > > > > However, for LoongArch, we do not want such a "t

Re: [PATCH v1 2/6] LoongArch: improved target configuration interface

2023-08-14 Thread Yujie Yang
On Mon, Aug 14, 2023 at 01:22:32PM +0800, Xi Ruoyao wrote: > On Mon, 2023-08-14 at 11:57 +0800, Yang Yujie wrote: > > The configure script and the GCC driver are updated so that > > it is easier to customize and control GCC builds for targeting > > different LoongArch implementations. > > > > * Su

[PATCH v4 1/6] LoongArch: Add Loongson SX vector directive compilation framework.

2023-08-14 Thread Chenghui Pan
From: Lulu Cheng gcc/ChangeLog: * config/loongarch/genopts/loongarch-strings: Add compilation framework. * config/loongarch/genopts/loongarch.opt.in: Ditto. * config/loongarch/loongarch-c.cc (loongarch_cpu_cpp_builtins): Ditto. * config/loongarch/loongarch-def.c:

[PATCH v4 4/6] LoongArch: Add Loongson ASX vector directive compilation framework.

2023-08-14 Thread Chenghui Pan
From: Lulu Cheng gcc/ChangeLog: * config/loongarch/genopts/loongarch-strings: Add compilation framework. * config/loongarch/genopts/loongarch.opt.in: Ditto. * config/loongarch/loongarch-c.cc (loongarch_cpu_cpp_builtins): Ditto. * config/loongarch/loongarch-def.c:

[PATCH v4 0/6] Add Loongson SX/ASX instruction support to LoongArch target.

2023-08-14 Thread Chenghui Pan
This is an update of: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626194.html This version of patch set only introduces some small simplications of implementation. Because I missed the size limitation of mail size, the huge testsuite patches of v2 and v3 are not shown in the mail list. S

RE: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

2023-08-14 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan From: Kito Cheng Sent: Monday, August 14, 2023 11:02 PM To: Li, Pan2 Cc: Wang, Yanzhang ; gcc-patches ; 钟居哲 Subject: Re: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API Checked with doc and llvm implementation, LGTM

Re: IRA update_equiv_regs for (was Re: ICE for interim fix for PR/110748)

2023-08-14 Thread Vineet Gupta
On 8/11/23 17:04, Jeff Law wrote: I'm wondering (naively) if there is some way to tune this - for a given backend. In general it would make sense to do the replacement, but not if the cost changes (e.g. consts could be embedded in x86 insn freely, but not for RISC-V where this is costly and

Is this a bug for __builtin_dynamic_object_size?

2023-08-14 Thread Qing Zhao via Gcc-patches
Hi, Sid, For the following testing case: #include #define noinline __attribute__((__noinline__)) static void noinline alloc_buf_more (int index) { struct annotated { long foo; char b; char array[index]; long c; } q, *p; p = &q; printf("the__bdos of p->array whole max

Re: [PATCH v9] RISC-V: Add the 'zfa' extension, version 0.2

2023-08-14 Thread Jeff Law via Gcc-patches
On 8/14/23 00:10, Jin Ma wrote: Additional links: v10, the patch that needs to be reviewed again: http://patchwork.ozlabs.org/project/gcc/patch/20230814055033.1995-1-ji...@linux.alibaba.com/ v9 and the previous review comments: http://patchwork.ozlabs.org/project/gcc/patch/20230515131628.953-

Re: [PATCH] RISC-V: Handle no_insn in TARGET_SCHED_VARIABLE_ISSUE.

2023-08-14 Thread Jeff Law via Gcc-patches
On 8/14/23 14:33, Edwin Lu wrote: On 8/11/2023 6:29 AM, Jeff Law via Gcc-patches wrote: On 8/10/23 21:45, Palmer Dabbelt wrote: This seems pretty mechinacial: just scrub through our MDs to check for any un-typed insns, then add the assert and fix the failures. You're more than welcome

Re: [PATCH] Add support for vector conitional not

2023-08-14 Thread Andrew Pinski via Gcc-patches
On Mon, Aug 14, 2023 at 2:37 PM Richard Sandiford via Gcc-patches wrote: > > Andrew Pinski via Gcc-patches writes: > > Like the support conditional neg (r12-4470-g20dcda98ed376cb61c74b2c71), > > this just adds conditional not too. > > Also we should be able to turn `(a ? -1 : 0) ^ b` into a condi

Re: [RFC] GCC Security policy

2023-08-14 Thread Siddhesh Poyarekar
On 2023-08-14 17:16, Alexander Monakov wrote: On Mon, 14 Aug 2023, Siddhesh Poyarekar wrote: 1. It makes it clear to users of the project the scope in which the project could be used and what safety it could reasonably expect from the project. In the context of GCC for example, it cannot expe

Re: [PATCH v4 2/8] libcpp: diagnostics: Support generated data in expanded locations

2023-08-14 Thread Lewis Hyatt via Gcc-patches
On Fri, Aug 11, 2023 at 07:02:49PM -0400, David Malcolm wrote: > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote: > > The previous patch in this series introduced the concept of LC_GEN line > > maps. This patch continues on the path to using them to improve _Pragma > > diagnostics, by adding a

Re: [PATCH] Add support for vector conitional not

2023-08-14 Thread Richard Sandiford via Gcc-patches
Andrew Pinski via Gcc-patches writes: > Like the support conditional neg (r12-4470-g20dcda98ed376cb61c74b2c71), > this just adds conditional not too. > Also we should be able to turn `(a ? -1 : 0) ^ b` into a conditional > not. > > OK? Bootstrapped and tested on x86_64-linux-gnu and aarch64-linux-

Re: [RFC] GCC Security policy

2023-08-14 Thread Alexander Monakov
On Mon, 14 Aug 2023, Siddhesh Poyarekar wrote: > 1. It makes it clear to users of the project the scope in which the project > could be used and what safety it could reasonably expect from the project. In > the context of GCC for example, it cannot expect the compiler to do a safety > check of

Re: [PATCH] RISC-V: Handle no_insn in TARGET_SCHED_VARIABLE_ISSUE.

2023-08-14 Thread Edwin Lu
On 8/11/2023 6:29 AM, Jeff Law via Gcc-patches wrote: On 8/10/23 21:45, Palmer Dabbelt wrote: This seems pretty mechinacial: just scrub through our MDs to check for any un-typed insns, then add the assert and fix the failures.  You're more than welcome to have at it, but LMK if you want

[pushed][LRA]: Process output stack pointer reloads before emitting reload insns

2023-08-14 Thread Vladimir Makarov via Gcc-patches
The patch fixes a failure of building aarch64 port with my yesterday patch. The patch was successfully bootstrapped on x86-64 and aarch64. commit c4760c0161f92b92361feba11836e3d066bb330c Author: Vladimir N. Makarov Date: Mon Aug 14 16:06:27 2023 -0400 [LRA]: Process output stack pointer r

Re: [PATCH 0/3] fortran: fix length one character dummy args [PR110419]

2023-08-14 Thread Mikael Morin
Hello, Le 13/08/2023 à 23:16, Harald Anlauf via Fortran a écrit : Hi Mikael, Am 09.08.23 um 22:21 schrieb Mikael Morin via Gcc-patches: Hello, (...) I have regression tested this on x86_64-unknown-linux-gnu, and powerpc64-unknown-linux-gnu (both -m32 and -m64). OK for master? this looks

Re: [RFC] GCC Security policy

2023-08-14 Thread Siddhesh Poyarekar
On 2023-08-14 14:51, Richard Sandiford wrote: I think it would help to clarify what the aim of the security policy is. Specifically: (1) What service do we want to provide to users by classifying one thing as a security bug and another thing as not a security bug? (2) What service do we wa

Re: [PATCH] Fortran: Avoid accessing gfc_charlen when not looking at BT_CHARACTER (PR 110677)

2023-08-14 Thread Harald Anlauf via Gcc-patches
Hi Martin, Am 14.08.23 um 19:39 schrieb Martin Jambor: Hello, this patch addresses an issue uncovered by the undefined behavior sanitizer. In function resolve_structure_cons in resolve.cc there is a test starting with: if (cons->expr->ts.type == BT_CHARACTER && comp->ts.u.cl

Re: [pushed]LRA]: Fix asserts for output stack pointer reloads

2023-08-14 Thread Vladimir Makarov via Gcc-patches
On 8/14/23 14:37, Prathamesh Kulkarni wrote: On Mon, 14 Aug 2023 at 06:39, Vladimir Makarov via Gcc-patches wrote: The following patch fixes useless asserts in my latest patch implementing output stack pointer reloads. Hi Vladimir, It seems that this patch caused the following ICE on aarch64

Re: [RFC] GCC Security policy

2023-08-14 Thread Richard Sandiford via Gcc-patches
I think it would help to clarify what the aim of the security policy is. Specifically: (1) What service do we want to provide to users by classifying one thing as a security bug and another thing as not a security bug? (2) What service do we want to provide to the GNU community by the same

Re: [PATCH V4] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-14 Thread Stefan Schulze Frielinghaus via Gcc-patches
Hi everyone, I have bootstrapped and regtested the patch below on s390. For the 64-bit target I do not see any changes regarding the testsuite. For the 31-bit target I see the following failures: FAIL: gcc.dg/vect/no-scevccp-outer-14.c (internal compiler error: in require, at machmode.h:313) F

Re: [pushed]LRA]: Fix asserts for output stack pointer reloads

2023-08-14 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 14 Aug 2023 at 06:39, Vladimir Makarov via Gcc-patches wrote: > > The following patch fixes useless asserts in my latest patch > implementing output stack pointer reloads. Hi Vladimir, It seems that this patch caused the following ICE on aarch64-linux-gnu while building cp-demangle.c: comp

[PATCH 9/9] arm: [MVE intrinsics] rework vmullbq_poly vmulltq_poly

2023-08-14 Thread Christophe Lyon via Gcc-patches
Implement vmull[bt]q_poly using the new MVE builtins framework. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vmullbq_poly) (vmulltq_poly): New. * config/arm/arm-mve-builtins-base.def (vmullbq_poly) (vmulltq_poly): New. *

[PATCH 4/9] arm: [MVE intrinsics] rework vmullbq_int vmulltq_int

2023-08-14 Thread Christophe Lyon via Gcc-patches
Implement vmullbq_int, vmulltq_int using the new MVE builtins framework. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vmullbq_int, vmulltq_int): New. * config/arm/arm-mve-builtins-base.def (vmullbq_int, vmulltq_int): New.

[PATCH 8/9] arm: [MVE intrinsics] add unspec_mve_function_exact_insn_vmull_poly

2023-08-14 Thread Christophe Lyon via Gcc-patches
Introduce a function that will be used to build vmull[bt]q_poly intrinsics that use poly types. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-functions.h (class unspec_mve_function_exact_insn_vmull_poly): New. --- gcc/config/arm/arm-mve-builtins-functio

[PATCH 7/9] arm: [MVE intrinsics] add binary_widen_poly shape

2023-08-14 Thread Christophe Lyon via Gcc-patches
This patch adds the binary_widen_poly shape description. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_widen_poly): New. * config/arm/arm-mve-builtins-shapes.h (binary_widen_poly): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 4

[PATCH 3/9] arm: [MVE intrinsics] add binary_widen shape

2023-08-14 Thread Christophe Lyon via Gcc-patches
This patch adds the binary_widen shape description. 2023-08-14 Christophe Lyon gcc/: * config/arm/arm-mve-builtins-shapes.cc (binary_widen): New. * config/arm/arm-mve-builtins-shapes.h (binary_widen): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 42 +++

[PATCH 6/9] arm: [MVE intrinsics] add support for U and p formats in parse_element_type

2023-08-14 Thread Christophe Lyon via Gcc-patches
Introduce these two format specifiers to define the shape of vmull[bt]q_poly intrinsics. 'U' is used to define a double-width unsigned 'p' is used to define an element of 'poly' type. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (parse_element_type):

[PATCH 5/9] arm: [MVE intrinsics] add support for p8 and p16 polynomial types

2023-08-14 Thread Christophe Lyon via Gcc-patches
Although they look like aliases for u8 and u16, we need to define them so that we can handle p8 and p16 suffixes with the general framework. They will be used by vmull[bt]q_poly intrinsics. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins.cc (type_suffixes): Handl

[PATCH 2/9] arm: [MVE intrinsics] add unspec_mve_function_exact_insn_vmull

2023-08-14 Thread Christophe Lyon via Gcc-patches
Introduce a function that will be used to build vmull intrinsics with the _int variant. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-functions.h (class unspec_mve_function_exact_insn_vmull): New. --- gcc/config/arm/arm-mve-builtins-functions.h | 74 +++

[PATCH 1/9] arm: [MVE intrinsics] factorize vmullbq vmulltq

2023-08-14 Thread Christophe Lyon via Gcc-patches
Factorize vmullbq, vmulltq so that they use the same parameterized names. 2023-08-14 Christophe Lyon gcc/ * config/arm/iterators.md (mve_insn): Add vmullb, vmullt. (isu): Add VMULLBQ_INT_S, VMULLBQ_INT_U, VMULLTQ_INT_S, VMULLTQ_INT_U. (supf): Add VMULLBQ

Re: [PATCH v3] c++: extend cold, hot attributes to classes

2023-08-14 Thread Jason Merrill via Gcc-patches
On 8/11/23 09:18, Javier Martinez wrote: Hi Jason, Regarding the initialization example - no, the set of classes that we consider cold is more loosely defined. On Thu, Aug 10, 2023 at 11:01 PM Jason Merrill > wrote: > Yes, but that's because the implicit op== isn't

[PATCH] arm: [MVE intrinsics] Remove dead check for float type in parse_element_type

2023-08-14 Thread Christophe Lyon via Gcc-patches
Fix a likely copy/paste error, where we check if ch == 'f' after we checked it's either 's' or 'u'. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (parse_element_type): Remove dead check. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 3 +-- 1

[PATCH] arm: [MVE intrinsics] fix binary_acca_int32 and binary_acca_int64 shapes

2023-08-14 Thread Christophe Lyon via Gcc-patches
Fix these two shapes, where we were failing to check the last non-predicate parameter. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_acca_int32): Fix loop bound. (binary_acca_int64): Likewise. --- gcc/config/arm/arm-mve-builtins-shape

Re: [PATCH v1] c++: follow DR 2386 and update implementation of get_tuple_size [PR110216]

2023-08-14 Thread Jason Merrill via Gcc-patches
On 8/12/23 04:16, gnaggnoyil wrote: DR 2386 updated the tuple_size requirements for structured binding and it now requires tuple_size to be considered only if std::tuple_size names a complete class type with member value. GCC before this patch does not follow the updated requrements, and this pat

[PATCH] Fortran: Avoid accessing gfc_charlen when not looking at BT_CHARACTER (PR 110677)

2023-08-14 Thread Martin Jambor
Hello, this patch addresses an issue uncovered by the undefined behavior sanitizer. In function resolve_structure_cons in resolve.cc there is a test starting with: if (cons->expr->ts.type == BT_CHARACTER && comp->ts.u.cl && comp->ts.u.cl->length && comp->ts.u.cl->length

[pushed] c++: -fconcepts and __cpp_concepts

2023-08-14 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Since -fconcepts no longer implies -fconcepts-ts, we shouldn't advertise TS support with __cpp_concepts=201507L. Also fix one case where -std=c++14 -fconcepts wasn't working (as found by range-v3 calendar). Fixing other cases is not a prio

Re: [PATCH v4] Mode-Switching: Fix SET_SRC ICE for create_pre_exit

2023-08-14 Thread Jeff Law via Gcc-patches
On 8/12/23 18:56, pan2...@intel.com wrote: From: Pan Li In same cases, like gcc/testsuite/gcc.dg/pr78148.c in RISC-V, there will be only 1 operand when SET_SRC in create_pre_exit. For example as below. (insn 13 9 14 2 (clobber (reg/i:TI 10 a0)) "gcc/testsuite/gcc.dg/pr78148.c":24:1 -1 (

Re: [PATCH] Fix for bug libstdc++/110860

2023-08-14 Thread Jonathan Wakely via Gcc-patches
On Mon, 14 Aug 2023 at 10:58, Paul Dreik via Libstdc++ < libstd...@gcc.gnu.org> wrote: > The patch below fixes an issue with the fix already committed for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110860 which unfortunately > was not sufficient for small magnitude floating point values. > > W

Re: [PATCH] tree-optimization/110991 - unroll size estimate after vectorization

2023-08-14 Thread Jan Hubicka via Gcc-patches
> The following testcase shows that we are bad at identifying inductions > that will be optimized away after vectorizing them because SCEV doesn't > handle vectorized defs. The following rolls a simpler identification > of SSA cycles covering a PHI and an assignment with a binary operator > with a

Re: [PATCH v2] analyzer: New option fanalyzer-show-events-in-system-headers [PR110543]

2023-08-14 Thread David Malcolm via Gcc-patches
On Mon, 2023-08-14 at 17:48 +0200, priour...@gmail.com wrote: > From: benjamin priour > > Plenty useful, thanks David. I've adjusted some few things, especially > the artifacts of earlier versions I missed when building the commit. > > I didn't how to test for warnings within , I couldn't figure

Avoid division by zero in fold_loop_internal_call

2023-08-14 Thread Jan Hubicka via Gcc-patches
Hi, My patch to fix profile after folding internal call is missing check for the case profile was already zero before if-conversion. Bootstrapped/regtested x86_64-linux, comitted. gcc/ChangeLog: PR gcov-profile/110988 * tree-cfg.cc (fold_loop_internal_call): Avoid division by zer

[PATCH v2] analyzer: New option fanalyzer-show-events-in-system-headers [PR110543]

2023-08-14 Thread Benjamin Priour via Gcc-patches
From: benjamin priour Plenty useful, thanks David. I've adjusted some few things, especially the artifacts of earlier versions I missed when building the commit. I didn't how to test for warnings within , I couldn't figure a portable test. I cannot pinpoint the line the warning is issued at in

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-14 Thread Arsen Arsenović via Gcc-patches
Arsen Arsenović writes: > This commit replaces the ad-hoc logic in with an AutoGen > database that (mostly) declaratively generates a version.h bit which > combines all of the FTM logic across all headers together. > > This generated header defines macros of the form __glibcxx_foo, > equivalent

Re: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

2023-08-14 Thread Kito Cheng via Gcc-patches
Checked with doc and llvm implementation, LGTM

Re: [PATCH][RFC] tree-optimization/92335 - Improve sinking heuristics for vectorization

2023-08-14 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 7 Aug 2023 at 13:19, Richard Biener wrote: > > On Mon, Aug 7, 2023 at 2:05 AM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > On Thu, 3 Aug 2023 at 17:48, Richard Biener wrote: > > > > > > On Thu, 3 Aug 2023, Richard Biener wrote: > > > > > > > On Thu, 3 Aug 2023, Richard Biener wro

RE: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

2023-08-14 Thread Li, Pan2 via Gcc-patches
Thanks Kito for comments, updated in PATCH v2. https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627367.html Pan -Original Message- From: Kito Cheng Sent: Monday, August 14, 2023 10:07 PM To: 钟居哲 Cc: Li, Pan2 ; gcc-patches ; Wang, Yanzhang Subject: Re: [PATCH v1] RISC-V: Support

[PATCH v2] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

2023-08-14 Thread Pan Li via Gcc-patches
From: Pan Li Update in v2: 1. Remove the template of vfrec7 frm class. 2. Update the vfrec7_frm_obj declaration. Original logs: This patch would like to support the rounding mode API for the VFREC7 as the below samples. * __riscv_vfrec7_v_f32m1_rm * __riscv_vfrec7_v_f32m1_rm_m Signed-off-by:

Re: [PATCH] x86: Update model values for Raptorlake.

2023-08-14 Thread Jonathan Wakely via Gcc-patches
On 14/08/23 15:19 +0100, Jonathan Wakely wrote: On 14/08/23 04:37 +, Pan Li via Gcc-patches wrote: Committed as obvious, and backported to GCC13. Did you try building it on gcc-13? case 0x97: case 0x9a: case 0xbf: /* Alder Lake. */ case 0xb7: case 0xba: case 0xbf:

Re: [PATCH] x86: Update model values for Raptorlake.

2023-08-14 Thread Jonathan Wakely via Gcc-patches
On 14/08/23 04:37 +, Pan Li via Gcc-patches wrote: Committed as obvious, and backported to GCC13. Did you try building it on gcc-13? case 0x97: case 0x9a: case 0xbf: /* Alder Lake. */ case 0xb7: case 0xba: case 0xbf: /* Raptor Lake. */ This fails: I

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-14 Thread Richard Sandiford via Gcc-patches
"Kewen.Lin" writes: > Hi Richard, > > on 2023/8/14 20:20, Richard Sandiford wrote: >> Thanks for the clean-ups. But... >> >> "Kewen.Lin" writes: >>> Hi, >>> >>> Following Richi's suggestion [1], this patch is to move the >>> handlings on VMAT_GATHER_SCATTER in the final loop nest >>> of functio

[PATCH][GCC] aarch64: Add support for Cortex-A720 CPU

2023-08-14 Thread Richard Ball via Gcc-patches
This patch adds support for the Cortex-A720 CPU to GCC. No regressions on aarch64-none-elf. Ok for master? gcc/ChangeLog: * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add Cortex- A720 CPU. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Do

Re: [PATCH v2 0/3] RISC-V: Support ZC* extensions.

2023-08-14 Thread Kito Cheng via Gcc-patches
Pushed to the trunk, with slight updates like rename and update testcases :) On Wed, Jun 7, 2023 at 10:28 PM Kito Cheng via Gcc-patches wrote: > > Thanks Jiawei, v2 patch set are LGTM, but I would like to defer this until > binutils part has merged, I know you guys already implement that for a >

Re: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

2023-08-14 Thread Kito Cheng via Gcc-patches
> +template You don't need a template class here since it can only be UNSPEC_VFREC7. > +class vfrec7_frm : public function_base > +{ > +public: > + bool has_rounding_mode_operand_p () const override { return true; } > + > + rtx expand (function_expander &e) const override > + { > +return e

Re: [PATCH] vect: Move VMAT_LOAD_STORE_LANES handlings from final loop nest

2023-08-14 Thread Richard Biener via Gcc-patches
On Mon, Aug 14, 2023 at 2:49 PM Kewen.Lin wrote: > > Hi Richi, > > on 2023/8/14 20:04, Richard Biener wrote: > > On Mon, Aug 14, 2023 at 10:54 AM Kewen.Lin wrote: > >> > >> Hi, > >> > >> Following Richi's suggestion [1], this patch is to move the > >> handlings on VMAT_LOAD_STORE_LANES in the fin

Re: Re: [PATCH V4] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-14 Thread Richard Biener via Gcc-patches
On Mon, 14 Aug 2023, ??? wrote: > Thanks Kewen. > > But I saw there is 2 more files include: > > +#include "memmodel.h" > +#include "optabs.h" > > Not sure whether Richard and Richi ok with that change ? Yes, please just apply some common sense. > Thanks. > > > > juzhe.zh...@rivai.ai > >

Re: [PATCH] tree-optimization/110991 - unroll size estimate after vectorization

2023-08-14 Thread Richard Biener via Gcc-patches
On Mon, 14 Aug 2023, Richard Biener wrote: > The following testcase shows that we are bad at identifying inductions > that will be optimized away after vectorizing them because SCEV doesn't > handle vectorized defs. The following rolls a simpler identification > of SSA cycles covering a PHI and a

[PATCH] tree-optimization/110991 - unroll size estimate after vectorization

2023-08-14 Thread Richard Biener via Gcc-patches
The following testcase shows that we are bad at identifying inductions that will be optimized away after vectorizing them because SCEV doesn't handle vectorized defs. The following rolls a simpler identification of SSA cycles covering a PHI and an assignment with a binary operator with a constant

Re: Re: [PATCH V4] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-14 Thread 钟居哲
Thanks Kewen. But I saw there is 2 more files include: +#include "memmodel.h" +#include "optabs.h" Not sure whether Richard and Richi ok with that change ? Thanks. juzhe.zh...@rivai.ai From: Kewen.Lin Date: 2023-08-14 20:45 To: juzhe.zh...@rivai.ai CC: Robin Dapp; richard.sandiford; rguent

Re: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

2023-08-14 Thread 钟居哲
I defer this patch's review to kito since I am not sure whether vfrec7 needs rounding mode. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-08-14 20:49 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

Re: [RFC] GCC Security policy

2023-08-14 Thread Siddhesh Poyarekar
Hi, Here's the updated draft of the top part of the security policy with all of the recommendations incorporated. Thanks, Sid What is a GCC security bug? === A security bug is one that threatens the security of a system or network, or might compromise the sec

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-14 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2023/8/14 20:20, Richard Sandiford wrote: > Thanks for the clean-ups. But... > > "Kewen.Lin" writes: >> Hi, >> >> Following Richi's suggestion [1], this patch is to move the >> handlings on VMAT_GATHER_SCATTER in the final loop nest >> of function vectorizable_load to its own loo

Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors

2023-08-14 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Thu, 10 Aug 2023 at 21:27, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> >> static bool >> >> is_simple_vla_size (poly_uint64 size) >> >> { >> >> if (size.is_constant ()) >> >> return false; >> >> for (int i = 1; i < ARRAY_SIZE (size.coe

RE: [2/2] RISC-V: Constant FP Optimization with 'Zfa'

2023-08-14 Thread Jin Ma via Gcc-patches
Hi Tsukasa, What a coincidence, I also implemented zfa extension, which also includes fli related instructions :) links: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627294.html > + if (!TARGET_HARD_FLOAT || !TARGET_ZFA) > +return result; > + switch (GET_MODE (x)) > +{ > +

Re: [PATCH] vect: Move VMAT_LOAD_STORE_LANES handlings from final loop nest

2023-08-14 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2023/8/14 20:04, Richard Biener wrote: > On Mon, Aug 14, 2023 at 10:54 AM Kewen.Lin wrote: >> >> Hi, >> >> Following Richi's suggestion [1], this patch is to move the >> handlings on VMAT_LOAD_STORE_LANES in the final loop nest >> of function vectorizable_load to its own loop. Basic

[PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

2023-08-14 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFREC7 as the below samples. * __riscv_vfrec7_v_f32m1_rm * __riscv_vfrec7_v_f32m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (class vfrec7_frm): New class

Re: [PATCH V4] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-14 Thread Kewen.Lin via Gcc-patches
Hi Juzhe, on 2023/8/14 20:08, juzhe.zh...@rivai.ai wrote: > Hi, Kewin. > > Could you test 'can_vec_extract_var_idx_p' and send V5 patch when you pass > the testing? The below diff was bootstrapped and regress-tested on Power10 LE. Comparing to the previous v4, the only changes should be the p

Re: [PATCH] vect: Move VMAT_GATHER_SCATTER handlings from final loop nest

2023-08-14 Thread Richard Sandiford via Gcc-patches
Thanks for the clean-ups. But... "Kewen.Lin" writes: > Hi, > > Following Richi's suggestion [1], this patch is to move the > handlings on VMAT_GATHER_SCATTER in the final loop nest > of function vectorizable_load to its own loop. Basically > it duplicates the final loop nest, clean up some usel

[PATCH] RISC-V: Support MASK_LEN_{LOAD_LANES,STORE_LANES}

2023-08-14 Thread Juzhe-Zhong
This patch is depending on middle-end support: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627305.html This patch allow us auto-vectorize this following case: #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \ void __attribute__ ((noinline, noclone))

Re: Re: [PATCH V4] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-14 Thread juzhe.zh...@rivai.ai
Hi, Kewin. Could you test 'can_vec_extract_var_idx_p' and send V5 patch when you pass the testing? Thanks. juzhe.zh...@rivai.ai From: Kewen.Lin Date: 2023-08-14 17:19 To: Robin Dapp CC: gcc-patches; richard.sandiford; rguenther; juzhe.zh...@rivai.ai Subject: Re: [PATCH V4] VECT: Support loop

  1   2   >