Re: [PATCH 2/2] c++: partial ordering and dep alias tmpl specs [PR90679]

2023-12-15 Thread Patrick Palka
On Thu, 1 Jun 2023, Patrick Palka wrote: > During partial ordering, we want to look through dependent alias > template specializations within template arguments and otherwise > treat them as opaque in other contexts (see e.g. r7-7116-g0c942f3edab108 > and r11-7011-g6e0a231a4aa240). To that end

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-15 Thread Tim Song
On Fri, Dec 15, 2023 at 4:43 AM Jonathan Wakely wrote: > On Fri, 15 Dec 2023 at 01:17, Tim Song wrote: > > > > On Thu, Dec 14, 2023 at 6:05 PM Jonathan Wakely > wrote: > >> + inline void > >> + vprint_unicode(ostream& __os, string_view __fmt, format_args __args) > >> + { > >> +

Re: [PATCH v4 10/11] aarch64: Add new load/store pair fusion pass

2023-12-15 Thread Richard Sandiford
Alex Coplan writes: > This is a v6 of the aarch64 load/store pair fusion pass, which > addresses the feedback from Richard's last review here: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640539.html > > In particular this version implements the suggested changes which > greatly

[PATCH 3/3][RFC] RISC-V: Enable assert for insn_has_dfa_reservation

2023-12-15 Thread Edwin Lu
Enables assert that every typed instruction is associated with a dfa reservation gcc/ChangeLog: * config/riscv/riscv.cc (riscv_sched_variable_issue): enable assert Signed-off-by: Edwin Lu --- gcc/config/riscv/riscv.cc | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [pushed] testsuite: move more analyzer test cases to c-c++-common (3) [PR96395]

2023-12-15 Thread Rainer Orth
David Malcolm writes: > Move a further 268 tests from gcc.dg/analyzer to c-c++-common/analyzer. > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > Pushed to trunk as r14-6564-gae034b9106fbdd. This patch introduced 840 additional FAILs on i386-pc-solaris2.11, no doubt more

Re: [PATCH] match.pd: Optimize sign-extension followed by truncation [PR113024]

2023-12-15 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > While looking at a bitint ICE, I've noticed we don't optimize > in f1 and f5 functions below the 2 casts into just one at GIMPLE, > even when optimize it in convert_to_integer if it appears in the same > stmt. The large match.pd simplification of two conversions

[r14-6559 Regression] FAIL: gcc.dg/guality/pr58791-4.c -Os -DPREVENT_OPTIMIZATION line pr58791-4.c:32 i == 486 on Linux/x86_64

2023-12-15 Thread haochen.jiang
On Linux/x86_64, 8afdbcdd7abe1e3c7a81e07f34c256e7f2dbc652 is the first bad commit commit 8afdbcdd7abe1e3c7a81e07f34c256e7f2dbc652 Author: Di Zhao Date: Fri Dec 15 03:22:32 2023 +0800 Consider fully pipelined FMA in get_reassociation_width caused FAIL: gcc.dg/pr110279-2.c

Re: [PATCH 1/2] c++: refine dependent_alias_template_spec_p [PR90679]

2023-12-15 Thread Patrick Palka
On Mon, 11 Sep 2023, Patrick Palka wrote: > On Thu, 1 Jun 2023, Patrick Palka wrote: > > > For a complex alias template-id, dependent_alias_template_spec_p returns > > true if any template argument of the template-id is dependent. This > > predicate indicates that substitution into the

Re: [PATCH v7] libgfortran: Replace mutex with rwlock

2023-12-15 Thread Richard Earnshaw
On 15/12/2023 11:31, Lipeng Zhu wrote: On 2023/12/14 23:50, Richard Earnshaw (lists) wrote: On 09/12/2023 15:39, Lipeng Zhu wrote: This patch try to introduce the rwlock and split the read/write to unit_root tree and unit_cache with rwlock instead of the mutex to increase CPU efficiency.

Re: [PATCH v4 3/3] RISC-V: Add support for XCVbi extension in CV32E40P

2023-12-15 Thread Jeff Law
On 12/12/23 12:32, Mary Bennett wrote: Spec: github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributors: Mary Bennett Nandni Jamnadas Pietra Ferreira Charlie Keaney Jessica Mills Craig Blackmore Simon Cook Jeremy Bennett

[committed v4 5/5] aarch64: Add function multiversioning support

2023-12-15 Thread Andrew Carlotti
This adds initial support for function multiversioning on aarch64 using the target_version and target_clones attributes. This loosely follows the Beta specification in the ACLE [1], although with some differences that still need to be resolved (possibly as follow-up patches). Existing function

Re: [PR target/110201] Fix operand types for various scalar crypto insns

2023-12-15 Thread Jeff Law
On 12/14/23 17:14, Christoph Müllner wrote: On Fri, Dec 15, 2023 at 12:36 AM Jeff Law wrote: On 12/14/23 02:46, Christoph Müllner wrote: On Tue, Jun 20, 2023 at 12:34 AM Jeff Law via Gcc-patches wrote: A handful of the scalar crypto instructions are supposed to take a constant

Re: [PATCH] RISC-V: Don't make Ztso imply A

2023-12-15 Thread Andrew Waterman
On Fri, Dec 15, 2023 at 1:38 PM Jeff Law wrote: > > > > On 12/12/23 20:54, Palmer Dabbelt wrote: > > I can't actually find anything in the ISA manual that makes Ztso imply > > A. In theory the memory ordering is just a different thing that the set > > of availiable instructions (ie, Ztso without

Re: [PATCH] libstdc++: Make __gnu_debug::vector usable in constant expressions [PR109536]

2023-12-15 Thread Patrick Palka
On Wed, 6 Dec 2023, Jonathan Wakely wrote: > Any comments on this approach? > > -- >8 -- > > This makes constexpr std::vector (mostly) work in Debug Mode. All safe > iterator instrumentation and checking is disabled during constant > evaluation, because it requires mutex locks and calls to

Re: [PATCH v4 2/3] RISC-V: Update XCValu constraints to match other vendors

2023-12-15 Thread Jeff Law
On 12/12/23 12:32, Mary Bennett wrote: gcc/ChangeLog: * config/riscv/constraints.md: CVP2 -> CV_alu_pow2. * config/riscv/corev.md: Likewise. --- Kito ack'd the V3 patch, so I went ahead and pushed this to the trunk. jeff

Re: [PATCH] RISC-V: Add Zvfbfmin extension to the -march= option

2023-12-15 Thread Jeff Law
On 12/12/23 20:24, Xiao Zeng wrote: This patch would like to add new sub extension (aka Zvfbfmin) to the -march= option. It introduces a new data type BF16. Depending on different usage scenarios, the Zvfbfmin extension may depend on 'V' or 'Zve32f'. This patch only implements dependencies

Re: [PATCH v4 10/11] aarch64: Add new load/store pair fusion pass

2023-12-15 Thread Alex Coplan
On 15/12/2023 15:34, Richard Sandiford wrote: > Alex Coplan writes: > > This is a v6 of the aarch64 load/store pair fusion pass, which > > addresses the feedback from Richard's last review here: > > > > https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640539.html > > > > In particular this

[committed v4 4/5] Add support for target_version attribute

2023-12-15 Thread Andrew Carlotti
This patch adds support for the "target_version" attribute to the middle end and the C++ frontend, which will be used to implement function multiversioning in the aarch64 backend. On targets that don't use the "target" attribute for multiversioning, there is no conflict between the "target" and

Re: [PATCH] RISC-V: Don't make Ztso imply A

2023-12-15 Thread Jeff Law
On 12/12/23 20:54, Palmer Dabbelt wrote: I can't actually find anything in the ISA manual that makes Ztso imply A. In theory the memory ordering is just a different thing that the set of availiable instructions (ie, Ztso without A would still imply TSO for loads and stores). It also seems

Re: [PATCH] RISC-V: Add -fno-vect-cost-model to pr112773 testcase

2023-12-15 Thread Jeff Law
On 12/14/23 14:32, Patrick O'Neill wrote: The testcase for pr112773 started passing after r14-6472-g8501edba91e which was before the actual fix. This patch adds -fno-vect-cost-model which prevents the testcase from passing due to the vls change. gcc/testsuite/ChangeLog: *

[PATCH] c++: Fix unchecked use of CLASSTYPE_AS_BASE [PR113031]

2023-12-15 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu with GLIBCXX_TESTSUITE_STDS=20 and RUNTESTFLAGS="--target_board=unix/-D_GLIBCXX_USE_CXX11_ABI=0". -- >8 -- My previous patch (naively) assumed that a TREE_CODE of RECORD_TYPE or UNION_TYPE was sufficient for optype to be considered a "class

Re: [PATCH v4 1/3] RISC-V: Add support for XCVelw extension in CV32E40P

2023-12-15 Thread Jeff Law
On 12/12/23 12:32, Mary Bennett wrote: Spec: github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributors: Mary Bennett Nandni Jamnadas Pietra Ferreira Charlie Keaney Jessica Mills Craig Blackmore Simon Cook Jeremy Bennett

Re: [PATCH] c++: Fix unchecked use of CLASSTYPE_AS_BASE [PR113031]

2023-12-15 Thread Jason Merrill
On 12/15/23 19:20, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu with GLIBCXX_TESTSUITE_STDS=20 and RUNTESTFLAGS="--target_board=unix/-D_GLIBCXX_USE_CXX11_ABI=0". OK, thanks. -- >8 -- My previous patch (naively) assumed that a TREE_CODE of RECORD_TYPE or

Re: Re: [PATCH] RISC-V: Add Zvfbfmin extension to the -march= option

2023-12-15 Thread Xiao Zeng
2023-12-16 03:27  Jeff Law wrote: >   > > >On 12/12/23 20:24, Xiao Zeng wrote: >> This patch would like to add new sub extension (aka Zvfbfmin) to the >> -march= option. It introduces a new data type BF16. >> >> Depending on different usage scenarios, the Zvfbfmin extension may >> depend on 'V'

Re: [committed v4 5/5] aarch64: Add function multiversioning support

2023-12-15 Thread Ramana Radhakrishnan
On Sat, Dec 16, 2023 at 6:18 AM Andrew Carlotti wrote: > > This adds initial support for function multiversioning on aarch64 using > the target_version and target_clones attributes. This loosely follows > the Beta specification in the ACLE [1], although with some differences > that still need to

[PATCH v4 10/11] aarch64: Add new load/store pair fusion pass

2023-12-15 Thread Alex Coplan
This is a v6 of the aarch64 load/store pair fusion pass, which addresses the feedback from Richard's last review here: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640539.html In particular this version implements the suggested changes which greatly simplify the double list walk.

[PATCH 1/3][RFC] RISC-V: Add non-vector types to pipelines

2023-12-15 Thread Edwin Lu
This patch does not create vector related insn reservations for generic.md and sifive-7.md. It updates/creates insn reservations for all non-vector typed insns gcc/ChangeLog: * config/riscv/generic-ooo.md (generic_ooo_sfb_alu): create/update reservation (generic_ooo_branch):

[PATCH 2/3][RFC] RISC-V: Add vector related reservations

2023-12-15 Thread Edwin Lu
This patch copies the vector reservations from generic-ooo.md and inserts them into generic.md and sifive.md. The vector pipelines are necessary to avoid an ICE from the assert gcc/ChangeLog: * config/riscv/generic-ooo.md: syntax * config/riscv/generic.md (pipe0): new reservation

[PATCH 0/3][RFC] RISC-V: Associate typed insns to dfa reservation

2023-12-15 Thread Edwin Lu
This series is a prototype for adding all typed instructions to a dfa scheduling pipeline. I've been working on adding insn reservations for all typed instructions to ensure all instructions are part of a dfa pipeline. I don't have a good understanding of vector instruction latency, so I have

[Committed] RISC-V: Remove xfail for some of the SLP tests

2023-12-15 Thread Juzhe-Zhong
Due to recent middle-end cost model changes, now we can do more VLA SLP. Fix these following regressions: XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-assembler \\tvand XPASS: gcc.target/riscv/rvv/autovec/partial/slp-1.c scan-assembler \\tvand XPASS:

Re: [r14-6559 Regression] FAIL: gcc.dg/guality/pr58791-4.c -Os -DPREVENT_OPTIMIZATION line pr58791-4.c:32 i == 486 on Linux/x86_64

2023-12-15 Thread Richard Biener
On Fri, Dec 15, 2023 at 2:25 AM haochen.jiang wrote: > > On Linux/x86_64, > > 8afdbcdd7abe1e3c7a81e07f34c256e7f2dbc652 is the first bad commit > commit 8afdbcdd7abe1e3c7a81e07f34c256e7f2dbc652 > Author: Di Zhao > Date: Fri Dec 15 03:22:32 2023 +0800 > > Consider fully pipelined FMA in

[pushed] doc: Update nvptx-tools Github link

2023-12-15 Thread Gerald Pfeifer
I pushed this obvious change. Gerald gcc: * doc/install.texi (Specific) : Update nvptx-tools Github link. --- gcc/doc/install.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index c1128d9274c..fffad700af7

[pushed] wwwdocs: projects/cli: Update ECMA reference

2023-12-15 Thread Gerald Pfeifer
Gerald --- htdocs/projects/cli.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projects/cli.html b/htdocs/projects/cli.html index 394832b6..47ddb362 100644 --- a/htdocs/projects/cli.html +++ b/htdocs/projects/cli.html @@ -460,7 +460,7 @@ allowing the user to

[PATCH v2] LoongArch: Implement FCCmode reload and cstore4

2023-12-15 Thread Xi Ruoyao
We used a branch to load floating-point comparison results into GPR. This is very slow when the branch is not predictable. Implement movfcc so we can reload FCCmode into GPRs, FPRs, and MEM. Then implement cstore4. gcc/ChangeLog: * config/loongarch/loongarch-tune.h

RE: [PATCH v4] [tree-optimization/110279] Consider FMA in get_reassociation_width

2023-12-15 Thread Thomas Schwinge
Hi! On 2023-12-13T08:14:28+, Di Zhao OS wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/pr110279-2.c > @@ -0,0 +1,41 @@ > +/* PR tree-optimization/110279 */ > +/* { dg-do compile } */ > +/* { dg-options "-Ofast --param tree-reassoc-width=4 --param > fully-pipelined-fma=1

[PATCH] sel-sched: Verify change before replacing dest in EXPR_INSN_RTX [PR112995]

2023-12-15 Thread Kewen.Lin
Hi, PR112995 exposed one issue in current try_replace_dest_reg that the result rtx insn after replace_dest_with_reg_in_expr is probably unable to match any constraints. Although there are some checks on the changes onto dest or src of orig_insn, none is performed on the EXPR_INSN_RTX. This

Re: Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread juzhe.zh...@rivai.ai
>> bool indices_fit_selector = maybe_ge (vec_len, 2 << GET_MODE_BITSIZE >> (GET_MODE_INNER (vmode))); No, I think it will make us miss some optimization. For example, for poly value [16,16] maybe_ge ([16,16], 65536) which makes us missed merge optimization but we definitely can do merge

Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread Robin Dapp
On 12/15/23 13:16, juzhe.zh...@rivai.ai wrote: > >>> bool indices_fit_selector = maybe_ge (vec_len, 2 << GET_MODE_BITSIZE >>> (GET_MODE_INNER (vmode))); > No, I think it will make us miss some optimization. > > For example, for poly value [16,16]  maybe_ge ([16,16], 65536) which makes us >

Re: Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread juzhe.zh...@rivai.ai
Do you mean like this ? /* We need to use precomputed mask for such situation and such mask can only be computed in compile-time known size modes. */ bool indices_fit_selector_p = maybe_ge (vec_len, 2 << GET_MODE_BITSIZE (GET_MODE_INNER (vmode))); if (GET_MODE_BITSIZE

Re: Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread juzhe.zh...@rivai.ai
Oh. I think it should be renamed into not_fit. Is this following make sense to you ? /* We need to use precomputed mask for such situation and such mask can only be computed in compile-time known size modes. */ bool indices_not_fit_selector_p = maybe_ge (vec_len, 2 <<

Re: [PATCH v2 2/4] libgrust: Add libproc_macro and build system

2023-12-15 Thread Thomas Schwinge
Hi Jason! I think you usually deal with these kind of GCC Git things? If not, please let me know. On 2023-10-26T10:21:18+0200, I wrote: > First, I've pushed into GCC upstream Git branch devel/rust/libgrust-v2 > the "v2" libgrust changes as posted by Arthur, so that people can easily > test this

Re: [committed] libstdc++: Implement C++23 header [PR107760]

2023-12-15 Thread Jonathan Wakely
On Fri, 15 Dec 2023 at 01:17, Tim Song wrote: > > On Thu, Dec 14, 2023 at 6:05 PM Jonathan Wakely wrote: >> + inline void >> + vprint_unicode(ostream& __os, string_view __fmt, format_args __args) >> + { >> +ostream::sentry __cerb(__os); >> +if (__cerb) >> + { >> + >> + const

Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread Robin Dapp
Hi Juzhe, in general looks OK. > + /* We need to use precomputed mask for such situation and such mask > + can only be computed in compile-time known size modes. */ > + if (GET_MODE_BITSIZE (GET_MODE_INNER (vmode)) == 8 && maybe_ge (vec_len, > 256) > + && !vec_len.is_constant ()) >

[PATCH] tree-optimization/113026 - avoid vector epilog in more cases

2023-12-15 Thread Richard Biener
The following avoids creating a niter peeling epilog more consistently, matching what peeling later uses for the skip_vector condition, in particular when versioning is required which then also ensures the vector loop is entered unless the epilog is vectorized. This should ideally match

Re: [PATCH v7] libgfortran: Replace mutex with rwlock

2023-12-15 Thread Lipeng Zhu
On 2023/12/14 23:50, Richard Earnshaw (lists) wrote: On 09/12/2023 15:39, Lipeng Zhu wrote: This patch try to introduce the rwlock and split the read/write to unit_root tree and unit_cache with rwlock instead of the mutex to increase CPU efficiency. In the get_gfc_unit function, the

Re: [PATCH] bitint: Introduce abi_limb_mode

2023-12-15 Thread Richard Biener
On Thu, 14 Dec 2023, Jakub Jelinek wrote: > Hi! > > Given what I saw in the aarch64/arm psABIs for BITINT_TYPE, as I said > earlier I'm afraid we need to differentiate between the limb mode/precision > specified in the psABIs (what is used to decide how it is actually passed, > aligned or what

Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread Robin Dapp
> Oh. I think it should be renamed into not_fit. > > Is this following make sense to you ? > >   /* We need to use precomputed mask for such situation and such mask >      can only be computed in compile-time known size modes.  */ >   bool indices_not_fit_selector_p >     = maybe_ge (vec_len, 2

Re: Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread juzhe.zh...@rivai.ai
Do you mean : /* We need to use precomputed mask for such situation and such mask can only be computed in compile-time known size modes. */ bool indices_fit_selector_p = GET_MODE_BITSIZE (GET_MODE_INNER (vmode)) > 8 || known_lt (vec_len, 256); if (!indices_fit_selector_p &&

Re: [PATCH] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread Robin Dapp
On 12/15/23 13:52, juzhe.zh...@rivai.ai wrote: > Do you mean : > >   /* We need to use precomputed mask for such situation and such mask >      can only be computed in compile-time known size modes.  */ >   bool indices_fit_selector_p >     = GET_MODE_BITSIZE (GET_MODE_INNER (vmode)) > 8 ||

[PATCH V2] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread Juzhe-Zhong
This patch fixes the following FAILs in "full coverage" testing: Running target riscv-sim/-march=rv64gcv_zvl256b/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=m8/--param=riscv-autovec-preference=fixed-vlmax FAIL: gcc.dg/vect/vect-strided-mult-char-ls.c -flto -ffat-lto-objects execution

Re: [PATCH V2] RISC-V: Fix vmerge optimization bug in vec_perm vectorization

2023-12-15 Thread Robin Dapp
LGTM. Regards Robin

Re: [PATCH v7 4/5] OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic

2023-12-15 Thread Thomas Schwinge
Hi! On 2023-12-14T15:26:38+0100, Tobias Burnus wrote: > On 19.08.23 00:47, Julian Brown wrote: >> This patch adds support for non-constant component offsets in "map" >> clauses for OpenMP (and the equivalants for OpenACC) [...] Should eventually also add some OpenACC test cases? > LGTM with:

[PATCH] LoongArch: Remove constraint z from movsi_internal

2023-12-15 Thread Xi Ruoyao
We don't allow SImode in FCC, so constraint z is never really used here. gcc/ChangeLog: * config/loongarch/loongarch.md (movsi_internal): Remove constraint z. --- Bootstrapped and regtested on loongarch64-linux-gnu. Ok for trunk? gcc/config/loongarch/loongarch.md | 6 +++---

[committed] libstdc++: Do not add padding for std::print to std::ostream

2023-12-15 Thread Jonathan Wakely
Tested x86_64-linux and x86_64-w64-mingw. Pushed to trunk. -- >8 -- Tim Song pointed out that although std::print behaves as a formatted output function, it does "determine padding" using the stream's flags. libstdc++-v3/ChangeLog: * include/std/ostream (vprint_nonunicode,

[committed] libstdc++: Simplify std::vprint_unicode for non-Windows targets

2023-12-15 Thread Jonathan Wakely
Tested x86_64-linux and x86_64-w64-mingw. Pushed to trunk. -- >8 -- Since we don't need to do anything special to print Unicode on non-Windows targets, we might as well just use std::vprint_nonunicode to implement std::vprint_unicode. Removing the duplicated code should reduce code size in cases

[committed] libstdc++: Fix std::print test case for Windows

2023-12-15 Thread Jonathan Wakely
Tested x86_64-linux and x86_64-w64-mingw. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * src/c++23/print.cc (__write_to_terminal) [_WIN32]: If handle does not refer to the console then just write to it using normal file I/O. * testsuite/27_io/print/2.cc