Re: Re: [PATCH] RISC-V: Enable full coverage vect tests

2023-10-11 Thread juzhe.zh...@rivai.ai
Thanks. Committed. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-10-11 14:54 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw Subject: Re: [PATCH] RISC-V: Enable full coverage vect tests Hi Juzhe, seems OK to me. We don't support most of the patterns direct

Re: committed [RISC-V]: Harden test scan patterns

2023-10-11 Thread Joern Rennecke
On Wed, 11 Oct 2023 at 05:48, Joern Rennecke wrote: > So I propose we look at the first character of the regexp, and if it's neither > ^ nor \ (neither caret nor backslash), we consider the regexp un-anchored, > and prepend ^[^"]* , so it won't allow a match after a double quote. Looking at the

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-11 Thread Iain Sandoe
Hi François, > On 11 Oct 2023, at 05:49, François Dumont wrote: > On 08/10/2023 15:59, Iain Sandoe wrote: >>> On 23 Sep 2023, at 21:10, François Dumont wrote: >>> >>> I'm eventually fixing those tests the same way we manage this problem in >>> libstdc++ testsuite. >>> >>>testsuite: Add op

Re: [PATCH] RISC-V: Remove XFAIL of ssa-dom-cse-2.c

2023-10-11 Thread Robin Dapp
LGTM FWIW. Regards Robin

Re: Re: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc'

2023-10-11 Thread juzhe.zh...@rivai.ai
Hi, Maciej. I have enable all vectorization test on RVV which is committed: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632598.html But I have added every test with: +|| ([istarget riscv*-*-*] +&& [check_effective_target_riscv_v]) As you said, you think we

[PATCH v2] x86: set spincount 1 for x86 hybrid platform

2023-10-11 Thread Jun Zhang
From: "Zhang, Jun" By test, we find in hybrid platform spincount 1 is better. Use '-march=native -Ofast -funroll-loops -flto', results as follows: spec2017 speed RPL ADL 657.xz_s 0.00% 0.50% 603.bwaves_s 10.90% 26.20% 607.cactuBSSN_s 5.50% 72.50% 619.lbm_s2.40%

[PATCH v1] LoongArch: Fix vec_initv32qiv16qi template to avoid ICE.

2023-10-11 Thread Chenghui Pan
Following test code triggers unrecognized insn ICE on LoongArch target with "-O3 -mlasx": void foo (unsigned char *dst, unsigned char *src) { for (int y = 0; y < 16; y++) { for (int x = 0; x < 16; x++) dst[x] = src[x] + 1; dst += 32; src += 32; } } ICE info: ./

[PATCH] Fix testcases that are raised by support -mevex512

2023-10-11 Thread Hu, Lin1
Hi, all This patch aims to fix some scan-asm fail of pr89229-{5,6,7}b.c since we emit scalar vmov{s,d} here, when trying to use x/ymm 16+ w/o avx512vl but with avx512f+evex512. If everyone has no objection to the modification of this behavior, then we tend to solve these failures by modifying the

[Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types

2023-10-11 Thread Paul Richard Thomas
Hi All, The title line of the PR should have been changed a long time since. As noted in comment 5, the original problem was fixed in 10.5. This patch fixes the problem described in comments 4 and 6, where the hidden string length component was not being set in pointer assignment of character arr

[PATCH v1] RISC-V: Support FP lrint/lrintf auto vectorization

2023-10-11 Thread pan2 . li
From: Pan Li This patch would like to support the FP lrint/lrintf auto vectorization. * long lrint (double) for rv64 * long lrintf (float) for rv32 Due to the limitation that only the same size of data type are allowed in the vectorier, the standard name lrintmn2 only act on DF => DI for rv64,

Re: [PATCH v2] x86: set spincount 1 for x86 hybrid platform

2023-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2023 at 04:39:28PM +0800, Jun Zhang wrote: > include/ChangeLog: > > * spincount.h: New file. > > libgomp/ChangeLog: > > * env.c (initialize_env): Use do_adjust_default_spincount. > * config/linux/x86/spincount.h: New file. Ok. Jakub

Re: [PATCH V1] use more get_range_query

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Jiufu Guo wrote: > Hi, > > For "get_global_range_query" SSA_NAME_RANGE_INFO can be queried. > For "get_range_query", it could get more context-aware range info. > And look at the implementation of "get_range_query", it returns > global range if no local fun info. > > So, if

Re: [PATCH v1] RISC-V: Support FP lrint/lrintf auto vectorization

2023-10-11 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-11 16:49 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP lrint/lrintf auto vectorization From: Pan Li This patch would like to support the FP lrint/lrintf auto vectorization.

Re: [PATCH] MATCH: [PR111282] Simplify `a & (b ^ ~a)` to `a & b`

2023-10-11 Thread Richard Biener
On Wed, Oct 11, 2023 at 2:46 AM Andrew Pinski wrote: > > While `a & (b ^ ~a)` is optimized to `a & b` on the rtl level, > it is always good to optimize this at the gimple level and allows > us to match a few extra things including where a is a comparison. > > Note I had to update/change the testca

[PATCH] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread Juzhe-Zhong
I suddenly I made a mistake that was lucky un-exposed. https://godbolt.org/z/c3jzrh7or GCC is using 32 bit index offset: vsll.vi v1,v1,2 vsetvli zero,a5,e32,m1,ta,ma vluxei32.v v1,(a1),v1 This is wrong since v1 may overflow 32bit after vsll.vi. After this patch: v

[PATCH-1v2, expand] Enable vector mode for compare_by_pieces [PR111449]

2023-10-11 Thread HAO CHEN GUI
Hi, Vector mode instructions are efficient on some targets (e.g. ppc64). This patch enables vector mode for compare_by_pieces. The non-member function widest_fixed_size_mode_for_size takes by_pieces_operation as the second argument and decide whether vector mode is enabled or not by the type of o

[PATCH-2v2, rs6000] Enable vector mode for memory equality compare [PR111449]

2023-10-11 Thread HAO CHEN GUI
Hi, This patch enables vector mode for memory equality compare by adding a new expand cbranchv16qi4 and implementing it. Also the corresponding CC reg and compare code is set in rs6000_generate_compare. With the patch, 16-byte equality compare can be implemented by one vector compare instructions

Re: [PATCH-2, rs6000] Enable vector mode for memory equality compare [PR111449]

2023-10-11 Thread HAO CHEN GUI
Hi David, 在 2023/10/10 20:44, David Edelsohn 写道: > Are you stating that although PPC32 supports V16QImode in VSX, the > move_by_pieces support also requires TImode, which is not available on PPC32? > Yes. By setting MOVE_MAX_PIECES to 16, TImode compare might be generated as it checks vector mo

[PATCH V2] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread Juzhe-Zhong
I suddenly discovered I made a mistake that was lucky un-exposed. https://godbolt.org/z/c3jzrh7or GCC is using 32 bit index offset: vsll.vi v1,v1,2 vsetvli zero,a5,e32,m1,ta,ma vluxei32.v v1,(a1),v1 This is wrong since v1 may overflow 32bit after vsll.vi. After thi

Re: [PATCH] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread juzhe.zh...@rivai.ai
Refine the codes in V2: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632619.html juzhe.zh...@rivai.ai From: Juzhe-Zhong Date: 2023-10-11 17:03 To: gcc-patches CC: kito.cheng; kito.cheng; jeffreyalaw; rdapp.gcc; Juzhe-Zhong Subject: [PATCH] RISC-V: Fix incorrect index(offset) of gath

Re: [PATCH V2] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread Robin Dapp
Hi Juzhe, good that you noticed it now, I should have caught that in the review back then... One thing, though: > + if (inner_offsize < GET_MODE_BITSIZE (GET_MODE (ptr)).to_constant ()) Shouldn't ptr always be Pmode i.e. the bitsize == XLEN? Rest LGTM. Regards Robin

[PATCH V3] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread Juzhe-Zhong
I suddenly discovered I made a mistake that was lucky un-exposed. https://godbolt.org/z/c3jzrh7or GCC is using 32 bit index offset: vsll.vi v1,v1,2 vsetvli zero,a5,e32,m1,ta,ma vluxei32.v v1,(a1),v1 This is wrong since v1 may overflow 32bit after vsll.vi. After thi

Re: [PATCH V3] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread Robin Dapp
LGTM, thanks. Regards Robin

Re: Re: [PATCH V2] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread juzhe.zh...@rivai.ai
Oh. Yes. Address comment: V3: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632623.html Use if (inner_offsize < BITS_PER_WORD) juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-10-11 17:50 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw Subject: Re: [

[PATCH v2] LoongArch: Adjust makefile dependency for loongarch headers.

2023-10-11 Thread Yang Yujie
gcc/ChangeLog: * config.gcc: Add loongarch-driver.h to tm_files. * config/loongarch/loongarch.h: Do not include loongarch-driver.h. * config/loongarch/t-loongarch: Append loongarch-multilib.h to $(GTM_H) instead of $(TM_H) for building generator programs. --- gcc/c

Principles of the C99 testsuite conversion

2023-10-11 Thread Florian Weimer
I've started to look at what it is required to convert the testsuite to C99 (without implicit ints, without implicit function declarations, and a few other legacy language features). I plan to bundle a bunch of fixes together and submit patches incrementally. So far, I have identified the followi

RE: [PATCH 1/3]middle-end: Refactor vectorizer loop conditionals and separate out IV to new variables

2023-10-11 Thread Tamar Christina
> > @@ -2664,7 +2679,7 @@ slpeel_update_phi_nodes_for_loops > (loop_vec_info loop_vinfo, > > for correct vectorization of live stmts. */ > >if (loop == first) > > { > > - basic_block orig_exit = single_exit (second)->dest; > > + basic_block orig_exit = second_loop_e->dest;

RE: [PATCH V3] RISC-V: Fix incorrect index(offset) of gather/scatter

2023-10-11 Thread Li, Pan2
Committed, thanks Robin. Pan -Original Message- From: Robin Dapp Sent: Wednesday, October 11, 2023 5:56 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rdapp@gmail.com; kito.ch...@gmail.com; kito.ch...@sifive.com; jeffreya...@gmail.com Subject: Re: [PATCH V3] RISC-V: Fix incorrect

RE: [PATCH 2/3]middle-end: updated niters analysis to handle multiple exits.

2023-10-11 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, October 10, 2023 12:14 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: Re: [PATCH 2/3]middle-end: updated niters analysis to handle > multiple exits. > > On Mon, 2 Oct 2023, Tamar C

Re: PR111648: Fix wrong code-gen due to incorrect VEC_PERM_EXPR folding

2023-10-11 Thread Prathamesh Kulkarni
On Mon, 9 Oct 2023 at 17:05, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch attempts to fix PR111648. > > As mentioned in PR, the issue is when a1 is a multiple of vector > > length, we end up creating following encoding in result: { base_elem, > > arg[0],

RE: [PATCH 3/3]middle-end: maintain LCSSA throughout loop peeling

2023-10-11 Thread Tamar Christina
> > + auto loop_exits = get_loop_exit_edges (loop); > > + auto_vec doms; > > + > >if (at_exit) /* Add the loop copy at exit. */ > > { > > - if (scalar_loop != loop) > > + if (scalar_loop != loop && new_exit->dest != exit_dest) > > { > > - gphi_iterator gsi; > > ne

Re: PR111648: Fix wrong code-gen due to incorrect VEC_PERM_EXPR folding

2023-10-11 Thread Prathamesh Kulkarni
On Wed, 11 Oct 2023 at 16:42, Prathamesh Kulkarni wrote: > > On Mon, 9 Oct 2023 at 17:05, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > Hi, > > > The attached patch attempts to fix PR111648. > > > As mentioned in PR, the issue is when a1 is a multiple of vector > > > lengt

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-10-11 Thread Stamatis Markianos-Wright
Hi all, On 28/09/2023 13:51, Andre Vieira (lists) wrote: Hi, On 14/09/2023 13:10, Kyrylo Tkachov via Gcc-patches wrote: Hi Stam, The arm parts look sensible but we'd need review for the df-core.h and df-core.cc changes. Maybe Jeff can help or can recommend someone to take a look? Just

[PATCH v2] rs6000: Change bitwise xor to an equality operator [PR106907]

2023-10-11 Thread jeevitha
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. PR106907 has a few warnings spotted from cppcheck. These warnings are related to the need of precedence clarification. Instead of using xor, it has been changed to equality check, which achieves the same result.

[PATCH v4 0/2] RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread Mary Bennett
This patch series presents the comprehensive implementation of the MAC and ALU extension for CORE-V. Tested with riscv-gnu-toolchain on binutils, ld, gas and gcc testsuites to ensure its correctness and compatibility with the existing codebase. However, your input, reviews, and suggestions are inv

[PATCH v4 2/2] RISC-V: Add support for XCValu extension in CV32E40P

2023-10-11 Thread Mary Bennett
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 Helene Chelin gcc/ChangeLog: * common/config

[PATCH v4 1/2] RISC-V: Add support for XCVmac extension in CV32E40P

2023-10-11 Thread Mary Bennett
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 Helene Chelin gcc/ChangeLog: * common/config

RE: [PATCH 1/3]middle-end: Refactor vectorizer loop conditionals and separate out IV to new variables

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Tamar Christina wrote: > > > @@ -2664,7 +2679,7 @@ slpeel_update_phi_nodes_for_loops > > (loop_vec_info loop_vinfo, > > > for correct vectorization of live stmts. */ > > >if (loop == first) > > > { > > > - basic_block orig_exit = single_exit (second)->dest

RE: [PATCH 2/3]middle-end: updated niters analysis to handle multiple exits.

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, October 10, 2023 12:14 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > > Subject: Re: [PATCH 2/3]middle-end: updated niters analysis to

RE: [PATCH 3/3]middle-end: maintain LCSSA throughout loop peeling

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Tamar Christina wrote: > > > + auto loop_exits = get_loop_exit_edges (loop); > > > + auto_vec doms; > > > + > > >if (at_exit) /* Add the loop copy at exit. */ > > > { > > > - if (scalar_loop != loop) > > > + if (scalar_loop != loop && new_exit->dest != exi

[PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-11 Thread Juzhe-Zhong
This patch fixes this following FAILs in RISC-V regression: FAIL: gcc.dg/vect/vect-gather-1.c -flto -ffat-lto-objects scan-tree-dump vect "Loop contains only SLP stmts" FAIL: gcc.dg/vect/vect-gather-1.c scan-tree-dump vect "Loop contains only SLP stmts" FAIL: gcc.dg/vect/vect-gather-3.c -flto -

Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Juzhe-Zhong wrote: > This patch fixes this following FAILs in RISC-V regression: > > FAIL: gcc.dg/vect/vect-gather-1.c -flto -ffat-lto-objects scan-tree-dump > vect "Loop contains only SLP stmts" > FAIL: gcc.dg/vect/vect-gather-1.c scan-tree-dump vect "Loop contains only SL

Re: [committed] [PR target/93062] RISC-V: Handle long conditional branches for RISC-V

2023-10-11 Thread Andrew Waterman
On Tue, Oct 10, 2023 at 8:26 PM Jeff Law wrote: > > > > On 10/10/23 18:24, Andrew Waterman wrote: > > I remembered another concern since we discussed this patch privately. > > Using ra for long calls results in a sequence that will corrupt the > > return-address stack. > Yup. We've actually got d

Re: [PATCH] early outs for functions in rs6000.cc

2023-10-11 Thread David Edelsohn
On Tue, Oct 10, 2023 at 9:29 PM Jiufu Guo wrote: > Hi, > > There are some piece of code like below in rs6000.cc: > > ... > if (xx) >return x; > else if (yy) >return y; > ... //else if chain > else >return d; > > Using early outs would be more preferable for this kind of code. >

Re: [PATCH v4] c-family: Implement __has_feature and __has_extension [PR60512]

2023-10-11 Thread Alex Coplan
On 27/09/2023 15:27, Alex Coplan wrote: > Hi, > > This is a v4 patch to address Jason's feedback here: > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630911.html > > w.r.t. v3 it just removes a comment now that some uncertainty around > cxx_binary_literals has been resolved, and updat

Re: [PATCH v4 0/2] RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread Jeff Law
On 10/11/23 06:06, Mary Bennett wrote: This patch series presents the comprehensive implementation of the MAC and ALU extension for CORE-V. Tested with riscv-gnu-toolchain on binutils, ld, gas and gcc testsuites to ensure its correctness and compatibility with the existing codebase. However,

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Jeff Law
On 10/11/23 04:39, Florian Weimer wrote: I've started to look at what it is required to convert the testsuite to C99 (without implicit ints, without implicit function declarations, and a few other legacy language features). I bet those older tests originating from c-torture will be a bit pain

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Richard Earnshaw (lists)
On 11/10/2023 14:56, Jeff Law wrote: > > > On 10/11/23 04:39, Florian Weimer wrote: >> I've started to look at what it is required to convert the testsuite to >> C99 (without implicit ints, without implicit function declarations, and >> a few other legacy language features). > I bet those older t

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Jeff Law
On 10/11/23 08:10, Richard Earnshaw (lists) wrote: On 11/10/2023 14:56, Jeff Law wrote: On 10/11/23 04:39, Florian Weimer wrote: I've started to look at what it is required to convert the testsuite to C99 (without implicit ints, without implicit function declarations, and a few other legac

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2023 at 08:17:49AM -0600, Jeff Law wrote: > > > On 10/11/23 08:10, Richard Earnshaw (lists) wrote: > > On 11/10/2023 14:56, Jeff Law wrote: > > > > > > > > > On 10/11/23 04:39, Florian Weimer wrote: > > > > I've started to look at what it is required to convert the testsuite to

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Florian Weimer
* Jeff Law: > On 10/11/23 04:39, Florian Weimer wrote: >> I've started to look at what it is required to convert the testsuite to >> C99 (without implicit ints, without implicit function declarations, and >> a few other legacy language features). > I bet those older tests originating from c-tortu

Re: [PATCH v2] c++: Improve diagnostics for constexpr cast from void*

2023-10-11 Thread Marek Polacek
On Wed, Oct 11, 2023 at 10:57:06AM +1100, Nathaniel Shead wrote: > On Mon, Oct 09, 2023 at 04:10:20PM -0400, Jason Merrill wrote: > > On 10/9/23 06:03, Nathaniel Shead wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu with > > > GXX_TESTSUITE_STDS=98,11,14,17,20,23,26,impcx. > > > > >

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-11 Thread 钟居哲
Thanks Richi point it out. I found this patch can't make conditional gather load succeed on SLP. I am considering change MASK_LEN_GATHER_LOAD in pattern recognization: If no condition mask, in tree-vect-patterns.cc, I build MASK_LEN_GATHER_LOAD (ptr, offset, scale, 0) -> 4 arguments same as GA

[PATCH] C99 test suite readiness: Mark some C89 tests

2023-10-11 Thread Florian Weimer
Add -std=gnu89 to some tests which evidently target C89-only language features. gcc/testsuite/ * gcc.c-torture/compile/920501-11.c: Compile with -std=gnu89. * gcc.c-torture/compile/920501-23.c: Likewise. * gcc.c-torture/compile/920501-8.c: Likewise. * gcc.c-torture

[PATCH] C99 test suite conversation: Some unverified test case adjustments

2023-10-11 Thread Florian Weimer
These changes are assumed not to interfere with the test objective, but it was not possible to reproduce the historic test case failures (with or without the modification here). gcc/testsuite/ * gcc.c-torture/compile/2105-1.c: Add missing int return type. Call __builtin_exit i

[PATCH] C99 testsuite readiness: Some verified test case adjustments

2023-10-11 Thread Florian Weimer
The updated test cases still reproduce the bugs with old compilers. gcc/testsuite/ * gcc.c-torture/compile/pc44485.c (func_21): Add missing cast. * gcc.c-torture/compile/pr106101.c: Use builtins to avoid calls to undeclared functions. Change type of yyvsp to char

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Florian Weimer
* Florian Weimer: > * C89 test cases that appear to make explicit use of C89-only features. > I plan to add /* { dg-additional-options "-std=gnu89" } */ to those > (or add -std=gnu89 to an existing dg-options line). These fixes can > be submitted early. Example:

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-11 Thread François Dumont
Hi Iain On 11/10/2023 09:30, Iain Sandoe wrote: Hi François, On 11 Oct 2023, at 05:49, François Dumont wrote: On 08/10/2023 15:59, Iain Sandoe wrote: On 23 Sep 2023, at 21:10, François Dumont wrote: I'm eventually fixing those tests the same way we manage this problem in libstdc++ testsui

Re: [Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types

2023-10-11 Thread Harald Anlauf
Hi Paul, On 10/11/23 10:48, Paul Richard Thomas wrote: Hi All, The title line of the PR should have been changed a long time since. As noted in comment 5, the original problem was fixed in 10.5. This patch fixes the problem described in comments 4 and 6, where the hidden string length componen

Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction.

2023-10-11 Thread Robin Dapp
> It wasn't very clear, sorry, but it was the last sentence I was asking > for clarification on, not the other bits. Why do we want to avoid > generating a COND_ADD when the operand is a vectorisable call? Ah, I see, apologies. Upon thinking about it a bit more (thanks) I figured this hunk is no

Re: [Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types

2023-10-11 Thread Harald Anlauf
Hi Paul, the patch is fine, but I forgot the mention that the testcase needs fixing: Instead of ! {dg-do compile } you'll likely want ! { dg-do run } (Note the space before the dg-command.) Cheers, Harald On 10/11/23 21:06, Harald Anlauf wrote: Hi Paul, On 10/11/23 10:48, Paul Richard Th

[PATCH] Fortran: name conflict between internal procedure and derived type [PR104351]

2023-10-11 Thread Harald Anlauf
Dear All, the attached trivial patch fixes (= catches) a forgotten corner-case in the detection of a name conflict between an internal procedure and a local declaration for the case that the latter is a derived type. Another torture test by Gerhard... ;-) Used to ICE previously. Regtested on x86

Re: [PATCH] Fortran: name conflict between internal procedure and derived type [PR104351]

2023-10-11 Thread Harald Anlauf
Dear All, sorry for attaching the wrong patch - this time it is the correct one! Harald On 10/11/23 21:39, Harald Anlauf wrote: Dear All, the attached trivial patch fixes (= catches) a forgotten corner-case in the detection of a name conflict between an internal procedure and a local declarat

Re: [PATCH v16 02/39] c-family, c++: Look up built-in traits through gperf

2023-10-11 Thread Patrick Palka
On Tue, 10 Oct 2023, Ken Matsui wrote: > Since RID_MAX soon reaches 255 and all traits are used approximately once in > a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and > RID_TRAIT_TYPE for all traits and uses gperf to look up the specific trait. Nice! This looks good to m

Re: [PATCH v2] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-10-11 Thread Marek Polacek
On Tue, Oct 10, 2023 at 01:20:09PM -0400, Marek Polacek wrote: > @@ -3364,6 +3365,13 @@ word as an identifier. You can use the keyword > @code{__typeof__} instead. > This option is implied by the strict ISO C++ dialects: @option{-ansi}, > @option{-std=c++98}, @option{-std=c++11}, etc. > > +@o

[COMMITTED][GCC13] PR tree-optimization/111694 - Ensure float equivalences include + and - zero.

2023-10-11 Thread Andrew MacLeod
Similar patch which was checked into trunk last week.   slight tweak needed as dconstm0 was not exported in gcc 13, otherwise functionally the same Bootstrapped on x86_64-pc-linux-gnu.  pushed. Andrew commit f0efc4b25cba1bd35b08b7dfbab0f8fc81b55c66 Author: Andrew MacLeod Date: Mon Oct 9 13:

[PATCH v2] gcc: Introduce -fhardened

2023-10-11 Thread Marek Polacek
On Tue, Sep 19, 2023 at 10:58:19AM -0400, Marek Polacek wrote: > On Mon, Sep 18, 2023 at 08:57:39AM +0200, Richard Biener wrote: > > On Fri, Sep 15, 2023 at 5:09 PM Marek Polacek via Gcc-patches > > wrote: > > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, > > > powerpc64le-unknown-linux-

Re: [PATCH v2 3/4] RISC-V: Extend riscv_subset_list, preparatory for target attribute support

2023-10-11 Thread Kito Cheng
Thanks, committed with fixup for those two comments :) On Tue, Oct 10, 2023 at 7:01 AM Jeff Law wrote: > > > > On 10/9/23 22:13, Kito Cheng wrote: > > riscv_subset_list only accept a full arch string before, but we need to > > parse single extension when supporting target attribute, also we may

Re: [PATCH v2 1/4] options: Define TARGET__P and TARGET__OPTS_P macro for Mask and InverseMask

2023-10-11 Thread Kito Cheng
Thanks, committed, and just did one more check with x86 again, it works as well, hope no more awk portable issue this time :P On Tue, Oct 10, 2023 at 6:51 AM Jeff Law wrote: > > > > On 10/9/23 22:13, Kito Cheng wrote: > > We TARGET__P marcro to test a Mask and InverseMask with user > > specified

Re: [PATCH v2 2/4] RISC-V: Refactor riscv_option_override and riscv_convert_vector_bits. [NFC]

2023-10-11 Thread Kito Cheng
Thanks, committed :) On Tue, Oct 10, 2023 at 6:51 AM Jeff Law wrote: > > > > On 10/9/23 22:13, Kito Cheng wrote: > > Allow those funciton apply from a local gcc_options rather than the > > global options. > > > > Preparatory for target attribute, sperate this change for eaiser reivew > > since it

Re: [PATCH v2 4/4] RISC-V: Implement target attribute

2023-10-11 Thread Kito Cheng
> Assuming you're agreeable to adjusting the code to avoid alloca, we'll > do a quick turnaround on the v3 -- I'll just audit the return paths to > make sure we don't leak and we'll be good to go. Thanks for point out that, let me figure out which is the best way to fix that, using xstrdup + free

Re: [PATCH v16 02/39] c-family, c++: Look up built-in traits through gperf

2023-10-11 Thread Ken Matsui
On Wed, Oct 11, 2023 at 1:09 PM Patrick Palka wrote: > > On Tue, 10 Oct 2023, Ken Matsui wrote: > > > Since RID_MAX soon reaches 255 and all traits are used approximately once in > > a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and > > RID_TRAIT_TYPE for all traits and uses

[PATCH v17 00/39] Optimize type traits performance

2023-10-11 Thread Ken Matsui
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. Changes in v17: * Rebased on top of trunk * Improved clarity of the commit message * Simplified Make-lang.in * Made ridpointers for RID_TRAIT_EXPR

[PATCH v17 01/39] c++: Sort built-in traits alphabetically

2023-10-11 Thread Ken Matsui
This patch sorts built-in traits alphabetically for better code readability. gcc/cp/ChangeLog: * constraint.cc (diagnose_trait_expr): Sort built-in traits alphabetically. * cp-trait.def: Likewise. * semantics.cc (trait_expr_value): Likewise. (finish_trait_e

[PATCH v17 02/39] c-family, c++: Look up built-in traits through gperf

2023-10-11 Thread Ken Matsui
Since RID_MAX soon reaches 255 and all traits are used approximately once in a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and RID_TRAIT_TYPE for all traits and uses gperf to look up the specific trait. gcc/c-family/ChangeLog: * c-common.cc (c_common_reswords): Map a

[PATCH v17 04/39] libstdc++: Optimize is_const trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_const trait by dispatching to the new __is_const built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/includ

[PATCH v17 06/39] libstdc++: Optimize is_volatile trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_volatile trait by dispatching to the new __is_volatile built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __is_volatile built-in trait. (is_volatile_v): Likewise. Signed-off-by: Ken Matsui -

[PATCH v17 03/39] c++: Implement __is_const built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * Make-lang.in: Update key positions for gperf, based on automatically computed values. * cp-trait.def: Define __is_const. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h:

[PATCH v17 05/39] c++: Implement __is_volatile built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_volatile. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. * seman

[PATCH v17 13/39] c++: Implement __is_scoped_enum built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_scoped_enum. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scoped_enum. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM.

[PATCH v17 38/39] c++, libstdc++: Implement __is_scalar built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_scalar. The existent __is_scalar codes were replaced with __is_scalar_type to avoid unintentional macro replacement by the new built-in. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scalar. * cp-trait.gperf: Reflect cp-trait.def ch

[PATCH v17 12/39] libstdc++: Optimize is_bounded_array trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_bounded_array trait by dispatching to the new __is_bounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_bounded_array_v): Use __is_bounded_array built-in trait. Signed-off-by: Ken Matsui --- libstdc++

[PATCH v17 17/39] c++: Implement __is_member_function_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_member_function_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_function_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle

[PATCH v17 08/39] libstdc++: Optimize is_array trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_array trait by dispatching to the new __is_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_array): Use __is_array built-in trait. (is_array_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/includ

[PATCH v17 10/39] libstdc++: Optimize is_unbounded_array trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_unbounded_array trait by dispatching to the new __is_unbounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unbounded_array_v): Use __is_unbounded_array built-in trait. Signed-off-by: Ken Matsui --- l

[PATCH v17 28/39] c++, libstdc++: Implement __is_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantic

[PATCH v17 35/39] libstdc++: Optimize is_unsigned trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_unsigned trait by dispatching to the new __is_unsigned built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. (is_unsigned_v): Likewise. Signed-off-by: Ken Matsui -

[PATCH v17 21/39] c++: Implement __is_reference built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __is_reference. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * se

[PATCH v17 16/39] libstdc++: Optimize is_member_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_member_pointer trait by dispatching to the new __is_member_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_pointer): Use __is_member_pointer built-in trait. (is_member_pointer_v): Likewise.

[PATCH v17 11/39] c++: Implement __is_bounded_array built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_bounded_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_bounded_array. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_BOUNDED_ARRAY.

[PATCH v17 07/39] c++: Implement __is_array built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_array. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARRAY. * semantics.cc (

[PATCH v17 39/39] libstdc++: Optimize is_scalar trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_scalar trait by dispatching to the new __is_scalar built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scalar): Use __is_scalar built-in trait. (is_scalar_v): Likewise. Signed-off-by: Ken Matsui --- libstd

[PATCH v17 34/39] c++: Implement __is_unsigned built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * seman

[PATCH v17 09/39] c++: Implement __is_unbounded_array built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_unbounded_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unbounded_array. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNBOUNDED_A

[PATCH v17 18/39] libstdc++: Optimize is_member_function_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_member_function_pointer trait by dispatching to the new __is_member_function_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_function_pointer): Use __is_member_function_pointer built-in trait.

[PATCH v17 19/39] c++: Implement __is_member_object_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_member_object_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_object_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle

[PATCH v17 32/39] libstdc++: Optimize is_fundamental trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_fundamental_v): Use __is_arithmetic built-in trait. (is_fundamental): Likewise. Optimize the ori

[PATCH v17 14/39] libstdc++: Optimize is_scoped_enum trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_scoped_enum trait by dispatching to the new __is_scoped_enum built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scoped_enum): Use __is_scoped_enum built-in trait. (is_scoped_enum_v): Likewise. Signed-off-by

[PATCH v17 37/39] libstdc++: Optimize is_signed trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_signed trait by dispatching to the new __is_signed built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_signed): Use __is_signed built-in trait. (is_signed_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/i

[PATCH v17 20/39] libstdc++: Optimize is_member_object_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_member_object_pointer trait by dispatching to the new __is_member_object_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_object_pointer): Use __is_member_object_pointer built-in trait. (is_

  1   2   >