Re: [PATCH v2] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-06-13 Thread Surya Kumari Jangala via Gcc-patches
On 25/02/23 3:20 pm, Ajit Agarwal via Gcc-patches wrote: > Hello All: > > Here is the patch that uses xxlor instead of fmr where possible. > Performance results shows that fmr is better in power9 and > power10 architectures whereas xxlor is better in power7 and > power 8 architectures. fmr is

Re: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread Robin Dapp via Gcc-patches
Yes, I agree with the general assessment (and didn't mean to insinuate that the FAILs are compiler's or a fault of the patch. > So these 2 failures in RV32 are not the compile's bugs. I have seen: > /* { dg-do run { target { { {riscv_vector} && {rv64} } } } } */ in > these testcases which can not

RE: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread Li, Pan2 via Gcc-patches
> Any numbers on this Pan? How many cores do you use for running the testsuite? Sorry for missing this part. It takes about 4-6 minutes with spike and 16 cores. Pan -Original Message- From: Robin Dapp Sent: Wednesday, June 14, 2023 2:47 PM To: Li, Pan2 ; juzhe.zh...@rivai.ai; gcc-patche

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 13, 2023 at 07:54:25PM -0700, Paul Eggert wrote: > I don't see how you could implement __has_include_next() for > arbitrary non-GCC compilers, which is what we'd need for glibc users. For > glibc internals we can use "#include_next" more readily, since we assume a > new-enough GCC. I.e.

Re: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread Robin Dapp via Gcc-patches
> I don't have a proper sim environment setup yet.  How long does the > testsuite take > with spike?  Have you tried qemu as well? Any numbers on this Pan? How many cores do you use for running the testsuite? Regards Robin

RE: Re: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread Li, Pan2 via Gcc-patches
Thanks Juzhe for explanation, that make more sense to me and sorry for disturbing. Pan From: juzhe.zh...@rivai.ai Sent: Wednesday, June 14, 2023 2:31 PM To: Robin Dapp ; Li, Pan2 ; gcc-patches Cc: Robin Dapp ; jeffreyalaw ; Wang, Yanzhang ; kito.cheng Subject: Re: Re: [PATCH v1] RISC-V: Ali

Re: [PATCH] x86: add Bk and Br to comment list B's sub-chars

2023-06-13 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 14, 2023 at 1:56 PM Jan Beulich via Gcc-patches wrote: > > gcc/ > > * config/i386/constraints.md: Mention k and r for B. Ok. > > --- a/gcc/config/i386/constraints.md > +++ b/gcc/config/i386/constraints.md > @@ -162,7 +162,9 @@ > ;; g GOT memory operand. > ;; m Vector memo

Re: Re: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread juzhe.zh...@rivai.ai
All failures with (test for excess errors) are not big issues which are created by testcase themselves. For example: FAIL: g++.target/riscv/rvv/base/bug-14.C (test for excess errors) FAIL: g++.target/riscv/rvv/base/bug-9.C (test for excess errors) These 2 failures are because RV32 doesn't have in

Re: [PATCH] x86/AVX512: use VMOVDDUP for broadcast to V2DF

2023-06-13 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 14, 2023 at 1:55 PM Jan Beulich via Gcc-patches wrote: > > Like is already the case for the AVX/AVX2 form, VMOVDDUP - acting on > double precision floating values - is more appropriate to use here, and > it can also result in shorter insn encodings when source is memory or > %xmm0...%x

Re: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread Robin Dapp via Gcc-patches
Hi Pan, these failures were present before the patch I suppose? They don't look related. Is this what you meant by "the same as upstream"? > FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/full-vec-move1.c -std=c99 -O3 > -ftree-vectorize --param riscv-autovec-preference=fixed-vlmax (test for > ex

RE: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread Li, Pan2 via Gcc-patches
Thanks Juzhe, Just passed the RV64 riscv/rvv.exp but meet some failures in RV32 the same as upstream. However, this patch may not introduce new failures but I am not quite sure if there is risk here. lowlist `find build-gcc-newlib-stage2/gcc/testsuite/ -name *.sum |paste -sd "," -`

[PATCH] x86: make VPTERNLOG* usable on less than 512-bit operands with just AVX512F

2023-06-13 Thread Jan Beulich via Gcc-patches
There's no reason to constrain this to AVX512VL, as the wider operation is not usable for more narrow operands only when the possible memory source is a non-broadcast one. This way even the scalar copysign3 can benefit from the operation being a single-insn one (leaving aside moves which the compil

[PATCH] x86: make better use of VBROADCASTSS / VPBROADCASTD

2023-06-13 Thread Jan Beulich via Gcc-patches
... in vec_dupv4sf / *vec_dupv4si. The respective broadcast insns are never longer (yet sometimes shorter) than the corresponding VSHUFPS / VPSHUFD, due to the immediate operand of the shuffle insns balancing the need for VEX3 in the broadcast ones. When EVEX encoding is required the broadcast insn

[PATCH] x86: add Bk and Br to comment list B's sub-chars

2023-06-13 Thread Jan Beulich via Gcc-patches
gcc/ * config/i386/constraints.md: Mention k and r for B. --- a/gcc/config/i386/constraints.md +++ b/gcc/config/i386/constraints.md @@ -162,7 +162,9 @@ ;; g GOT memory operand. ;; m Vector memory operand ;; c Constant memory operand +;; k TLS address that allows insn using non-

[PATCH] x86/AVX512: use VMOVDDUP for broadcast to V2DF

2023-06-13 Thread Jan Beulich via Gcc-patches
Like is already the case for the AVX/AVX2 form, VMOVDDUP - acting on double precision floating values - is more appropriate to use here, and it can also result in shorter insn encodings when source is memory or %xmm0...%xmm7, and no masking is applied (in allowing a 2-byte VEX prefix then instead o

Re: [PATCH v5 6/6] libstdc++: make std::is_object dispatch to new built-in traits

2023-06-13 Thread Ken Matsui via Gcc-patches
On Tue, Jun 13, 2023 at 10:10 PM François Dumont wrote: > > > On 13/06/2023 00:22, Ken Matsui via Libstdc++ wrote: > > This patch gets std::is_object to dispatch to new built-in traits, > > __is_function, __is_reference, and __is_void. > > > > libstdc++-v3/ChangeLog: > > * include/std/type_t

Re: [PATCH v5 6/6] libstdc++: make std::is_object dispatch to new built-in traits

2023-06-13 Thread François Dumont via Gcc-patches
On 13/06/2023 00:22, Ken Matsui via Libstdc++ wrote: This patch gets std::is_object to dispatch to new built-in traits, __is_function, __is_reference, and __is_void. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use new built-in traits, __is_function, __is_refe

[PATCH] RISC-V: Use merge approach to optimize vector permutation

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong This patch is to optimize the permuation case that is suiteable use merge approach. Consider this following case: typedef int8_t vnx16qi __attribute__((vector_size (16))); #define MASK_16 0, 17, 2, 19, 4, 21, 6, 23, 8, 25, 10, 27, 12, 29, 14, 31 void __attribute__ ((

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > Hi! > > As I said in a reply to the original patch: not okay. Sorry. Thanks a lot for your comments! I'm also thinking about other solutions: 1. "set (mem/c:BLK (reg/f:DI 1 1) (const_int 0 [0])" This is the existing pattern. It may be read as an action t

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi Segher, David, David Edelsohn writes: > On Tue, Jun 13, 2023 at 2:16 PM Segher Boessenkool > wrote: >> >> Hi! >> >> On Tue, Jun 13, 2023 at 10:15:49AM +0800, Jiufu Guo wrote: >> > David Edelsohn writes: >> > > >> > > This definitely seems to be a better solution. >> > > >> > > The TARGET_

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Paul Eggert
On 6/12/23 23:28, Jakub Jelinek via Libc-alpha wrote: On Mon, Jun 12, 2023 at 09:51:02PM +, Joseph Myers wrote: On Sat, 10 Jun 2023, Jakub Jelinek via Gcc-patches wrote: I have looked at gnulib stdckdint.h and they are full of workarounds for various compilers, EDG doesn't do this, clang <

Re: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-06-14 10:15 To: gcc-patches CC: juzhe.zhong; rdapp.gcc; jeffreyalaw; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Align the predictor style for define_insn_and_split From: Pan Li This patch is considered as the follow up

[PATCH v1] RISC-V: Align the predictor style for define_insn_and_split

2023-06-13 Thread Pan Li via Gcc-patches
From: Pan Li This patch is considered as the follow up of the below PATCH. https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621347.html We aligned the predictor style for the define_insn_and_split suggested by Kito. To avoid potential issues before we hit. Signed-off-by: Pan Li gcc/Change

[PATCH, V6] Fix power10 fusion and -fstack-protector, PR target/105325

2023-06-13 Thread Michael Meissner via Gcc-patches
This patch fixes an issue where if you use the -fstack-protector and -mcpu=power10 options and you have a large stack frame, the GCC compiler will generate a LWA instruction with a large offset. Unlike the previous versions of this patch, I dug into it, and I found it was much more complex that I

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi, Xi Ruoyao writes: > On Tue, 2023-06-13 at 20:23 +0800, Jiufu Guo via Gcc-patches wrote: > >> Compare with previous version, this addes ChangeLog and removes >> const_anchor parts. >> https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621356.html. > > [Off topic] > > const_anchor is just bro

[PATCH] [x86] Use x instead of v for alternative 2 (v, BH) in mov_internal.

2023-06-13 Thread liuhongt via Gcc-patches
Since there's no evex version for vpcmpeq ymm, ymm, ymm. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready to push to trunk and backport to GCC13. gcc/ChangeLog: PR target/110227 * config/i386/sse.md (mov_internal>): Use x instead of v for alternative 2 sinc

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi, David Edelsohn writes: > On Mon, Jun 12, 2023 at 11:30 PM Jiufu Guo wrote: >> >> >> Hi David, >> >> David Edelsohn writes: >> > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: >> > >> > Hi, >> > >> > This patch checks if a constant is possible to be rotated to/from a >> > positive >>

Re: [PATCH v1] RISC-V: Bugfix for vec_init repeating auto vectorization in RV32

2023-06-13 Thread juzhe.zh...@rivai.ai
>> unsigned int elen = TARGET_VECTOR_ELEN_64 ? 64 : 32; Add comment here to demonstrate why you pick up elen to set the LIMIT. I understand: 1. -march=zve32* ===> ELEN = 32 -march=zve64* ===> ELEN = 64 2. both vmv.v.x/vmv.s.x is restrict to the ELEN For example, When ELEN=32 (-march=zve32*)

[PATCH v1] RISC-V: Bugfix for vec_init repeating auto vectorization in RV32

2023-06-13 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to fix one bug exported by RV32 test case multiple_rgroup_run-2.c. The mask should be restricted by elen in vector, and the condition between the vmv.s.x and the vmv.v.x should take inner_bits_size rather than constants. Passed both the rv32 and rv64 riscv/rvv

[PATCH] LoongArch: Set default alignment for functions and labels with -mtune

2023-06-13 Thread Xi Ruoyao via Gcc-patches
The LA464 micro-architecture is sensitive to alignment of code. The Loongson team has benchmarked various combinations of function, the results [1] show that 16-byte label alignment together with 32-byte function alignment gives best results in terms of SPEC score. Add a mtune-based table-driven

Re: [PATCH v3] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-06-13 Thread Fangrui Song via Gcc-patches
On Mon, Jun 12, 2023 at 11:16 PM Jan Beulich wrote: > On 13.06.2023 05:28, Fangrui Song wrote: > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/i386/large-data.c > > @@ -0,0 +1,13 @@ > > +/* { dg-do compile } */ > > +/* { dg-require-effective-target lp64 } */ > > +/* { dg-options "-O2 -mcmode

[pushed] c/c++: use positive tone in missing header notes [PR84890]

2023-06-13 Thread David Malcolm via Gcc-patches
Quoting "How a computer should talk to people" (as quoted in "Concepts Error Messages for Humans"): "Various negative tones or actions are unfriendly: being manipulative, not giving a second chance, talking down, using fashionable slang, blaming. We must not seem to blame the person. We should avo

Fix templated conversion operator demangling

2023-06-13 Thread Nathan Sidwell via Gcc-patches
I came across this when working on the conversion operator deduction fix. We'd successfully demangle an instantiation of 'template operator X & ()', but fail for 'template operator X ()'. The demangle printer was trying to specially handle the instantiation in the latter case -- seeing the te

Re: [PATCH] Fortran: fix passing of zero-sized array arguments to procedures [PR86277]

2023-06-13 Thread Harald Anlauf via Gcc-patches
Hi Steve, On 6/13/23 19:45, Steve Kargl via Gcc-patches wrote: On Mon, Jun 12, 2023 at 11:12:45PM +0200, Harald Anlauf via Fortran wrote: Dear all, the attached - actually rather small - patch is the result of a rather intensive session with Mikael in an attempt to fix the situation that we di

Re: [PATCH] Fix note_defect3 function

2023-06-13 Thread Akari Takahashi via Gcc-patches
Hi Jeff, Thank you for your response. Regarding the divtab.cc file, I actually came across it by accident while working on another task. I didn't have a specific reason for investigating the file, but I noticed the issue and thought it was worth bringing to your attention. Thank you for taking ca

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread David Edelsohn via Gcc-patches
On Tue, Jun 13, 2023 at 2:16 PM Segher Boessenkool wrote: > > Hi! > > On Tue, Jun 13, 2023 at 10:15:49AM +0800, Jiufu Guo wrote: > > David Edelsohn writes: > > > > > > This definitely seems to be a better solution. > > > > > > The TARGET_CONST_ANCHOR change should not be part of this patch. Also

Re: [PATCH] RISC-V: Save and restore FCSR in interrupt functions to avoid program errors.

2023-06-13 Thread Palmer Dabbelt
On Tue, 13 Jun 2023 10:41:00 PDT (-0700), gcc-patches@gcc.gnu.org wrote: On 6/13/23 00:41, Jin Ma wrote: gcc/ChangeLog: * config/riscv/riscv.cc (riscv_compute_frame_info): Allocate frame for FCSR. (riscv_for_each_saved_reg): Save and restore FCSR in interrupt functions.

[wwwdocs] gcc-14/changes.html + projects/gomp/: GCC 14 OpenMP update

2023-06-13 Thread Tobias Burnus
First update for OpenMP changes that made it into GCC 14. Wording, technical and other comments are welcome as always. I intent to commit the attached patch tomorrow. Tobias PS: There were a bunch of other useful changes, but those "only" improved and fixed features already supported or added

[patch] OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory

2023-06-13 Thread Tobias Burnus
I intent to commit this tomorrow, unless there are comments. It does as it says (see commit log): It initializes default-device-var to the value using the algorithm described in OpenMP 5.2, which depends on whether OMP_TARGET_OFFLOAD=mandatory was set. NOTE: With -foffload=disable there is no bi

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Segher Boessenkool
Hi! As I said in a reply to the original patch: not okay. Sorry. But some comments on this patch: On Tue, Jun 13, 2023 at 08:23:35PM +0800, Jiufu Guo wrote: > + && XINT (SET_SRC (set), 1) == UNSPEC_TIE > + && XVECEXP (SET_SRC (set), 0, 0) == const0_rtx); This makes it required that

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Segher Boessenkool
Hi! On Tue, Jun 13, 2023 at 10:15:49AM +0800, Jiufu Guo wrote: > David Edelsohn writes: > > > > This definitely seems to be a better solution. > > > > The TARGET_CONST_ANCHOR change should not be part of this patch. Also > > there is no ChangeLog for the patch. > > Thanks a lot for your quick r

[commited] Remove a couple mudflap remnants

2023-06-13 Thread Jeff Law via Gcc-patches
I happened to be digging into the specs to understand a build failure and spotted mflib and mfwrap. Those were used by the mudflap system which we ripped out years ago and we just missed these. I verified x86 still bootstraps after removing these bits. Pushed to the trunk as obvious, Jeff

[r14-1712 Regression] FAIL: gcc.target/i386/sse2-packuswb-1.c execution test on Linux/x86_64

2023-06-13 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 921b841350c4fc298d09f6c5674663e0f4208610 is the first bad commit commit 921b841350c4fc298d09f6c5674663e0f4208610 Author: Kyrylo Tkachov Date: Mon Jun 12 11:42:29 2023 +0100 simplify-rtx: Implement constant folding of SS_TRUNCATE, US_TRUNCATE caused FAIL: gcc.target/i386/

Re: [PATCH] Fortran: fix passing of zero-sized array arguments to procedures [PR86277]

2023-06-13 Thread Steve Kargl via Gcc-patches
On Mon, Jun 12, 2023 at 11:12:45PM +0200, Harald Anlauf via Fortran wrote: > Dear all, > > the attached - actually rather small - patch is the result of a > rather intensive session with Mikael in an attempt to fix the > situation that we did not create proper temporaries when passing > zero-sized

Re: [PATCH] RISC-V: Save and restore FCSR in interrupt functions to avoid program errors.

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 00:41, Jin Ma wrote: gcc/ChangeLog: * config/riscv/riscv.cc (riscv_compute_frame_info): Allocate frame for FCSR. (riscv_for_each_saved_reg): Save and restore FCSR in interrupt functions. * config/riscv/riscv.md (riscv_frcsr): New patterns. (riscv_f

[committed] Remove sh5media divtab code

2023-06-13 Thread Jeff Law via Gcc-patches
Spurred by Akari Takahashi's patch to config/sh/divtab.cc, this removes divtab.cc completely. divtab.cc was used to calculate a division table for the sh5 media processor. GCC dropped support for that (unmanufactured) chip back in 2016 and this file simply got missed AFAICT. Pushed to the

Re: [PATCH] Add __builtin_iseqsig()

2023-06-13 Thread FX Coudert via Gcc-patches
ping > Hi, > > (It took me a while to get back to this.) > > This is a new and improved version of the patch at > https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602932.html > It addresses the comment from Joseph that FE_INVALID should really be tested > in the case of both quiet and s

[committed] i386: Fix up whitespace in assembly

2023-06-13 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed that standard_sse_constant_opcode emits some spurious whitespace around tab, that isn't something which is done for any other instruction and looks wrong. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2023-06-13 Jakub Jelinek *

[PATCH] libcpp: Diagnose #include after failed __has_include [PR80753]

2023-06-13 Thread Jakub Jelinek via Gcc-patches
Hi! As can be seen in the testcase, we don't diagnose #include/#include_next of a non-existent header if __has_include/__has_include_next is done for that header first. The problem is that we normally error the first time some header is not found, but in the _cpp_FFK_HAS_INCLUDE case obviously don

Re: [PATCH] vect: Vectorize via libfuncs

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 09:55, Andrew Stubbs wrote: Subject: [PATCH] vect: Vectorize via libfuncs From: Andrew Stubbs Date: 6/13/23, 09:55 To: "gcc-patches@gcc.gnu.org" This patch allows vectorization when operators are available as libfuncs, rather that only as insns. This will be useful for amdgc

Re: [PATCH] RISC-V: Basic VLS code gen for RISC-V

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/12/23 17:39, juzhe.zhong wrote: I take this work which is very important for VLA SLP too.  I will support VLS after I finish VLA SLP. OK. I think I'll mark Kito's patch as dropped and we'll wait for your implementation in this space. jeff

[x86 PATCH] Convert ptestz of pandn into ptestc.

2023-06-13 Thread Roger Sayle
This patch is the next instalment in a set of backend patches around improvements to ptest/vptest. A previous patch optimized the sequence t=pand(x,y); ptestz(t,t) into the equivalent ptestz(x,y), using the property that ZF is set to (X&Y) == 0. This patch performs a similar transformation, conv

[PATCH] vect: Vectorize via libfuncs

2023-06-13 Thread Andrew Stubbs
This patch allows vectorization when operators are available as libfuncs, rather that only as insns. This will be useful for amdgcn where we plan to vectorize loops that contain integer division or modulus, but don't want to generate inline instructions for the division algorithm every time.

[PATCH, OpenACC 2.7] Implement self clause for compute constructs

2023-06-13 Thread Chung-Lin Tang via Gcc-patches
Hi Thomas, This patch implements the compiler side for the 'self' clause for compute constructs: parallel, kernels, and serial. As you know, the actual "local device" device type for libgomp is not yet implemented, so the libgomp side is basically just a simple duplicate of what host-fallback i

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Joseph Myers
On Tue, 13 Jun 2023, Jakub Jelinek via Gcc-patches wrote: > Yeah, having say __builtin_{clz,ctz,ffs,popcount,parity} variants which would > be typegeneric and would allow say any normal integral or _BitInt type > (or just unsigned versions thereof?) would be useful. Even without _BitInt > we have

Re: [ping] driver: Forward '-lgfortran', '-lm' to offloading compilation

2023-06-13 Thread Joseph Myers
On Tue, 13 Jun 2023, Thomas Schwinge wrote: > Hi! > > On 2023-06-05T14:25:18+0200, I wrote: > > OK to push the attached > > "driver: Forward '-lgfortran', '-lm' to offloading compilation"? > > (We didn't have a PR open for that, or did we?) > > Ping. OK. -- Joseph S. Myers jos...@codesourcery

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-13 Thread Tamar Christina via Gcc-patches
Hi All, Updated patch with feedback addressed. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Any feedback? Thanks, Tamar gcc/ChangeLog: * gensupport.cc (class conlist, add_constraints, add_attributes, skip_spaces, expect_char, preprocess_compact_syntax,

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 13, 2023 at 03:10:48PM +, Joseph Myers wrote: > > So why does C2X say > > Recommended practice > > It is recommended to produce a diagnostic message if type2 or type3 are > > not suitable integer types, or if *result is not a modifiable lvalue of > > a suitable integer type. > > ? >

Re: [PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-06-13 Thread Martin Jambor
Ping. Thanks, Martin On Fri, May 12 2023, Martin Jambor wrote: > Hi, > > PR 108007 is another manifestation where we rely on DCE to clean-up > after IPA-SRA and if the user explicitely switches DCE off, IPA-SRA > can leave behind statements which are fed uninitialized values and > trap, even tho

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Joseph Myers
On Tue, 13 Jun 2023, Jakub Jelinek via Gcc-patches wrote: > There is always the possibility to have the header co-owned by both > the compiler and C library, limits.h style. > Just > #if __has_include_next() > # include_next > #endif > perhaps guarded with some macro at the end of the GCC versio

RE: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Juzhe. Pan -Original Message- From: Gcc-patches On Behalf Of juzhe.zh...@rivai.ai Sent: Tuesday, June 13, 2023 6:56 PM To: 丁乐华 ; gcc-patches Subject: Re: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"` Send V2 patch with changelog. Thanks. j

Re: [PATCH] modula2: Fix bootstrap

2023-06-13 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 07, 2023 at 09:42:22AM +0100, Andre Vieira (lists) wrote: > I do need those includes and sorry I broke your bootstrap it didn't show up > on my aarch64-unknown-linux-gnu bootstrap, I'm guessing the rules there were > just run in a different order. Glad you were able to fix it :) Unfort

RE: [PATCH] RISC-V: Add comments of some functions

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Tuesday, June 13, 2023 10:06 PM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; rdapp

Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 00:50, Robin Dapp wrote: I suggest we implement vector calling convention even though it is not ratified yet. We can allow calling convention to be enabled only when --param=riscv-autovec-preference=fixed-vlmax. We have such issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1101

Re: [PATCH V2] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/12/23 20:27, juzhe.zh...@rivai.ai wrote: Ok. https://gcc.gnu.org/pipermail/gcc-patches/2023-June/thread.html I have add comments as you suggested. Thanks. With those changes I think the main patch here (RVV VLA SLP auto

Re: [PATCH] RISC-V: Add comments of some functions

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/12/23 20:26, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong gcc/ChangeLog: * config/riscv/riscv-v.cc (rvv_builder::single_step_npatterns_p): Add comment. (shuffle_generic_patterns): Ditto. (expand_vec_perm_const_1): Ditto. OK. Thanks! jeff

RE: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Tuesday, June 13, 2023 9:26 PM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; rdapp.

RE: [PATCH] RISC-V: Fix bug of VLA SLP auto-vectorization

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Tuesday, June 13, 2023 9:30 PM To: Robin Dapp ; juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosi

Ping * 2 : Fwd: [V9][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-06-13 Thread Qing Zhao via Gcc-patches
Hi, I’d like to ping this patch again for the Middle-end approval (on gcc/tree-object-size.cc change). This is an important patch to Linux Kernel security. The patch has addressed all the comments and suggestions raised during the review process. The C FE, Doc changes has been approved. Most

Re: [PATCH] Fix note_defect3 function

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/12/23 21:18, Akari Takahashi via Gcc-patches wrote: Hello, I've noticed an issue with the note_defect3 function and have prepared a patch to fix it. The function is missing a return statement, which is causing undefined behavior. This patch adds the missing return statement, ensuring tha

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-13 Thread David Edelsohn via Gcc-patches
On Mon, Jun 12, 2023 at 11:30 PM Jiufu Guo wrote: > > > Hi David, > > David Edelsohn writes: > > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > > > > Hi, > > > > This patch checks if a constant is possible to be rotated to/from a > > positive > > or negative value from "li". If so, we cou

Re: [PATCH] RISC-V: Fix bug of VLA SLP auto-vectorization

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 06:16, Robin Dapp wrote: Hi Juzhe, LGTM. You could also add the aarch64 test disclaimer here again, but no need for a V2. Agreed. jeff

Re: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 05:38, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-11.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-13.c: New test

[PATCH] Add -Wmissing-variable-declarations [PR65213].

2023-06-13 Thread Hamza Mahfooz
Resolves: PR c/65213 - Extend -Wmissing-declarations to variables [i.e. add -Wmissing-variable-declarations] gcc/c-family/ChangeLog: PR c/65213 * c.opt (-Wmissing-variable-declarations): New option. gcc/c/ChangeLog: PR c/65213 * c-decl.cc (start_decl): Handle -Wm

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Xi Ruoyao via Gcc-patches
On Tue, 2023-06-13 at 20:23 +0800, Jiufu Guo via Gcc-patches wrote: > Compare with previous version, this addes ChangeLog and removes > const_anchor parts. > https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621356.html. [Off topic] const_anchor is just broken now. See https://gcc.gnu.org/bug

[PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi, For stack_tie, currently below insn is generated: (insn 15 14 16 3 (parallel [ (set (mem/c:BLK (reg/f:DI 1 1) [1 A8]) (const_int 0 [0])) ]) "/home/guojiufu/temp/gdb.c":13:3 922 {stack_tie} (nil)) It is "set (mem/c:BLK (reg/f:DI 1 1) (const_int 0 [

[PATCH] Fix memory leak in loop header copying

2023-06-13 Thread Richard Biener via Gcc-patches
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-loop-ch.cc (ch_base::copy_headers): Free loop BBs. --- gcc/tree-ssa-loop-ch.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index 7fdef3bb11a..22252bee135 100

Re: Re: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe.zh...@rivai.ai
Ok. After floating-point binary. I will do floating-point ternary. I think you do conversion next (widen floating point, float to int, int to float). It seems that we almost done most of the part autovec patterns in RISC-V port. What else we can do? My second middle-end patch (LEN_MASK _* load/s

Re: [PATCH] RISC-V: Fix bug of VLA SLP auto-vectorization

2023-06-13 Thread Robin Dapp via Gcc-patches
Hi Juzhe, LGTM. You could also add the aarch64 test disclaimer here again, but no need for a V2. Regards Robin

[pushed] c++: mutable temps in rodata

2023-06-13 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- If the type of a temporary has mutable members, we can't set TREE_READONLY on the VAR_DECL; this is parallel to the check in cp_apply_type_quals_to_decl. gcc/cp/ChangeLog: * tree.cc (build_target_expr): Check TYPE_HAS_MUTABLE_P. g

Re: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread Robin Dapp via Gcc-patches
Hi Juzhe, thanks, works for me as is. I just hope somebody is going to take on the task of making different LMUL SLP variants "scannable" at some point because it would definitely increase our test coverage with these tests. (Or split the tests manually and not iterate over LMUL) Regards Robin

[PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-11.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-13.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-1

RE: [PATCH v5] RISC-V: Add vector psabi checking.

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed v6 with riscv.exp and rvv.exp passed, thanks Kito. Pan -Original Message- From: Li, Pan2 Sent: Monday, June 12, 2023 8:49 PM To: Kito Cheng ; Wang, Yanzhang Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai Subject: RE: [PATCH v5] RISC-V: Add vector psabi checking. Sure thing

Re: [PATCH] middle-end, i386: Pattern recognize add/subtract with carry [PR79173]

2023-06-13 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 13, 2023 at 08:40:36AM +, Richard Biener wrote: > I suspect re-association can wreck things even more here. I have > to say the matching code is very hard to follow, not sure if > splitting out a function matching > >_22 = .{ADD,SUB}_OVERFLOW (_6, _5); >_23 = REALPART_EXPR

Re: [ping] Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90'

2023-06-13 Thread Tobias Burnus
On 13.06.23 12:42, Thomas Schwinge wrote: On 2023-06-05T14:18:48+0200, I wrote: OK to push the attached "Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90'"? Subject: [PATCH] Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90' gcc/testsuite/ * gfortran.for

Re: [PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-13 Thread Richard Biener via Gcc-patches
On Mon, Jun 12, 2023 at 4:04 PM Roger Sayle wrote: > > > The following simple test case, from PR 104610, shows that memcmp () == 0 > can result in some bizarre code sequences on x86. > > int foo(char *a) > { > static const char t[] = "0123456789012345678901234567890"; > return __builtin_me

Re: [PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Lehua Ding
> LGTM. > Thanks. > Will merge it soon. Thank you for such a prompt reply.    

Re: [PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread juzhe.zh...@rivai.ai
LGTM. Thanks. Will merge it soon. juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-06-13 18:59 To: gcc-patches; juzhe.zhong Subject: [PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"` Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement an

[PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Lehua Ding
Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement and add #undef for ENTRY and TUPLE_ENTRY macros later. Best, Lehua gcc/ChangeLog: * config/riscv/riscv-v.cc (struct mode_vtype_group): Remove duplicate #include. (ENTRY): Undef. (TUPLE_EN

Re: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread juzhe.zh...@rivai.ai
Send V2 patch with changelog. Thanks. juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-06-13 18:53 To: gcc-patches; juzhe.zhong Subject: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"` Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement an

[PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Lehua Ding
Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement and add #undef for ENTRY and TUPLE_ENTRY macros later. Best, Lehua --- 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/ri

[ping] driver: Forward '-lgfortran', '-lm' to offloading compilation

2023-06-13 Thread Thomas Schwinge
Hi! On 2023-06-05T14:25:18+0200, I wrote: > OK to push the attached > "driver: Forward '-lgfortran', '-lm' to offloading compilation"? > (We didn't have a PR open for that, or did we?) Ping. Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201

[ping] Add 'libgomp.{, oacc-}fortran/fortran-torture_execute_math.f90'

2023-06-13 Thread Thomas Schwinge
Hi! On 2023-06-05T14:18:48+0200, I wrote: > OK to push the attached > "Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90'"? Ping. Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter H

[PATCH V2] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-11.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp_run-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/s

Re: Re: [PATCH] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe.zh...@rivai.ai
>> as the tests are mostly directly from aarch64's testsuite I would >> advise comments on where they were taken from as well as a TODO that >> they should become common tests for a specific target selector >> (vect_scalable_supported or something). Ok. >> (How about some assembly checks for th

[PATCH] c++: Fix ICE with parameter pack of decltype(auto) [PR103497]

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616465.html On Sat, Apr 22, 2023 at 04:25:13PM +1000, Nathaniel Shead wrote: > Bootstrapped and tested on x86_64-pc-linux-gnu. > > -- 8< -- > > This patch raises an error early when the decltype(auto) specifier is > used as a

[PATCH] c++: Report invalid id-expression in decltype [PR100482]

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. On Sun, Apr 30, 2023 at 12:00:05PM +1000, Nathaniel Shead wrote: > This patch ensures that any errors raised by finish_id_expression when > parsing a decltype expression are properly reported, rather than > potentially going ignored and causing invalid code to be accepted. > > We

[PATCH v2 0/3] c++: Track lifetimes in constant evaluation [PR70331,...]

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. I also have some more changes on top of this patch set as well if this looks good as it is. https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614811.html Thanks! On Wed, Mar 29, 2023 at 01:32:55PM +1100, Nathaniel Shead wrote: > This is an update of the patch series at > https

Re: [PATCH] RISC-V: Add more SLP tests

2023-06-13 Thread Robin Dapp via Gcc-patches
Hi Juzhe, as the tests are mostly directly from aarch64's testsuite I would advise comments on where they were taken from as well as a TODO that they should become common tests for a specific target selector (vect_scalable_supported or something). How about some assembly checks for the non-run te

[committed] libgomp/testsuite: Add requires-unified-addr-1.{c,f90} [PR109837]

2023-06-13 Thread Tobias Burnus
Add a testcase for "omp requires unified_address" as we hadn't one. The feature itself worked since the beginning (hardware + implementation wise); that the devices report 'omp requires unified_address' as supported is newer: for nvptx since r13-3460-g131d18e928a3ea and for GCN since r14-1584-gf1

  1   2   >