Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-02 Thread waffl3x
The problem with operators is fixed, now starts a long period of testing. It's been so long since I've gotten to this part that I almost forgot that I have to do it :'). When/if regtests and bootstrap all pass I will format the patch and submit it. --- Original Message --- On Wednesday,

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-02 Thread Jakub Jelinek
On Wed, Nov 01, 2023 at 11:15:56PM +, waffl3x wrote: > Just want to quickly check, when is the cutoff for GCC14 exactly? I Nov 18th EOD. But generally it is cutoff for posting new feature patches that could be accepted, patches posted before the deadline if reviewed soon after the deadline st

[RE] [7/7] riscv: Add basic extension support for XTheadFmv and XTheadInt

2023-11-02 Thread Jin Ma
Hi, I see that XTheadInt is not implemented in the compiler. Is there any plan here? If there is no patch for it, can I try to implement it with you? Thanks Jin

Re: [PATCH] Reduce false positives for -Wnonnull for VLA parameters [PR98541]

2023-11-02 Thread Richard Biener
On Tue, Oct 31, 2023 at 8:05 PM Martin Uecker wrote: > > > This is a revised part of previously posted patch which > I split up. C FE changes which another false positive > were already merged, but I still need approval for this > middle-end change. It would be nice to get this in, > because it

Re: [RE] [7/7] riscv: Add basic extension support for XTheadFmv and XTheadInt

2023-11-02 Thread Christoph Müllner
On Thu, Nov 2, 2023, 08:32 Jin Ma wrote: > Hi, I see that XTheadInt is not implemented in the compiler. Is there any > plan here? > If there is no patch for it, can I try to implement it with you? > Yes, sounds good. Let me know if you have any questions. We don't have any plans to work on this

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

2023-11-02 Thread Richard Biener
On Tue, 31 Oct 2023, Robin Dapp wrote: > >> +int > >> +internal_fn_else_index (internal_fn fn) > > > > The function needs a comment, maybe: > > > > /* If FN is an IFN_COND_* or IFN_COND_LEN_* function, return the index of > > the > >argument that is used when the condition is false. Return

[PATCH] MIPS: Use -mnan value for -mabs if not specified

2023-11-02 Thread YunQiang Su
On most hardware, FCSR.ABS2008 is set the value same with FCSR.NAN2008. Let's use this behaivor by default in GCC, aka gcc -mnan=2008 -c fabs.c will imply `-mabs=2008`. And of course, `gcc -mnan=2008 -mabs=legacy` can continue workable like previous. gcc/ChangeLog: * config/mips/

Re: [PATCH] c++: Implement C++26 P1854R4 - Making non-encodable string literals ill-formed [PR110341]

2023-11-02 Thread Jakub Jelinek
On Fri, Oct 27, 2023 at 07:05:34PM -0400, Jason Merrill wrote: > > --- gcc/testsuite/g++.dg/cpp26/literals1.C.jj 2023-08-25 > > 17:23:06.662878355 +0200 > > +++ gcc/testsuite/g++.dg/cpp26/literals1.C 2023-08-25 17:37:03.085132304 > > +0200 > > @@ -0,0 +1,65 @@ > > +// C++26 P1854R4 - Makin

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Richard Biener
On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > > > > > On Oct 31, 2023, at 6:14 PM, Joseph Myers wrote: > > > > On Tue, 31 Oct 2023, Qing Zhao wrote: > > > >> 2.3 A new semantic requirement in the user documentation of "counted_by" > >> > >> For the following structure including a FAM with a c

Re: Ping: [PATCH v3] libiberty: Use posix_spawn in pex-unix when available.

2023-11-02 Thread Richard Biener
On Wed, Nov 1, 2023 at 7:16 PM Brendan Shanks wrote: > > Polite ping on this. OK. Thanks, Richard. > > On Oct 4, 2023, at 11:28 AM, Brendan Shanks wrote: > > > > Hi, > > > > This patch implements pex_unix_exec_child using posix_spawn when > > available. > > > > This should especially benefit r

Re: [PATCH v1] EXPMED: Allow vector mode for DSE extract_low_bits [PR111720]

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 4:15 AM wrote: > > From: Pan Li > > The extract_low_bits only try the scalar mode if the bitsize of > the mode and src_mode is not equal. When vector mode is given > from get_stored_val in DSE, it will always fail and return NULL_RTX. > > This patch would like to allow the

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 08:57:36AM +0100, Richard Biener wrote: > You probably want to specify that when a pointer to the array is taken the > pointer has to be to the first array element (or do we want to mangle the > 'size' accordingly for the instrumentation?). You also want to specify that > t

[PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Sam James
Create and maintain a known_snapshots.txt index with space-separated format BRANCH-DATE COMMIT. For example: 8-20210107 5114ee0676e432493ada968e34071f02fb08114f 8-20210114 f9267925c648f2ccd9e4680b699e581003125bcf ... This is helpful for bisects and quickly looking up the information from bug repo

[PATCH 1/4] contrib: add generate_snapshot_index.py

2023-11-02 Thread Sam James
Script to create a map between weekly snapshots and the commit they're based on with space-separated format BRANCH-DATE COMMIT. For example: 8-20210107 5114ee0676e432493ada968e34071f02fb08114f 8-20210114 f9267925c648f2ccd9e4680b699e581003125bcf ... This is helpful for bisects and quickly looking

[PATCH 3/4] maintainer-scripts/gcc_release: use HTTPS for links

2023-11-02 Thread Sam James
maintainer-scripts/ * gcc_release: Use HTTPS for links. Signed-off-by: Sam James --- maintainer-scripts/gcc_release | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release index 4cd1fa799660..cf6a5731c609 1

[PATCH 4/4] maintainer-scripts/gcc_release: cleanup whitespace

2023-11-02 Thread Sam James
maintainer-scripts/ * gcc_release: Cleanup whitespace. Signed-off-by: Sam James --- maintainer-scripts/gcc_release | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release index cf6a5731c609..9651

[PATCH v3 1/2] intl: remove, in favor of out-of-tree gettext

2023-11-02 Thread Arsen Arsenović
ChangeLog: * intl/*: Remove. --- intl/ChangeLog | 306 -- intl/Makefile.in | 264 -- intl/README | 21 - intl/VERSION |1 - intl/aclocal.m4 | 33 - intl/bindtextdom.c | 374 -- intl/config.h.in | 280 -- intl/config.intl.in | 12 - intl

[PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext

2023-11-02 Thread Arsen Arsenović
Morning! This patch is a rebase and slight wording tweak of https://inbox.sourceware.org/20231006140501.3370874-1-ar...@aarsen.me Changes since v2: - Elaborate on the libintl requirement on non-glibc hosts, per Andrews request Range diff since v2 (since it seems sufficiently readable here): @@

[PATCH v3 2/2] *: add modern gettext

2023-11-02 Thread Arsen Arsenović
This patch updates gettext.m4 and related .m4 files and adds gettext-runtime as a gmp/mpfr/... style host library, allowing newer libintl to be used. This patch /does not/ add build-time tools required for internationalizing (msgfmt et al), instead, it just updates the runtime library. The result

Re: [PATCH 2/2] tree-optimization/111131 - SLP for non-IFN gathers

2023-11-02 Thread Thomas Schwinge
Hi! On 2023-10-31T13:10:24+, Richard Biener wrote: > On Tue, 31 Oct 2023, Thomas Schwinge wrote: >> On 2023-10-19T11:47:14+, Richard Biener wrote: >> > The following implements SLP vectorization support for gathers >> > without relying on IFNs being pattern detected (and supported by >>

[PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Sam James
Say 'memory lifetime' rather than 'memory life' as lifetime is the more standard term nowadays (indeed we have e.g. -fno-lifetime-dse). It's also easier to grep for if someone is looking for the documentation on where we do that. gcc/ChangeLog: * doc/passes.texi (Dead code elimination): Expli

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Jonathan Wakely
On 02/11/23 08:39 +, Sam James wrote: Create and maintain a known_snapshots.txt index with space-separated format BRANCH-DATE COMMIT. For example: 8-20210107 5114ee0676e432493ada968e34071f02fb08114f 8-20210114 f9267925c648f2ccd9e4680b699e581003125bcf ... This is helpful for bisects and quic

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

2023-11-02 Thread Bernhard Reutner-Fischer
[CCing Ian as libgcc maintainer] On Wed, 1 Nov 2023 10:14:37 + "Zhu, Lipeng" wrote: > > > > > > Hi Lipeng, > > > > > > >>> Sure, as your comments, in the patch V6, I added 3 test cases with > > > >>> OpenMP to test different cases in concurrency respectively: > > > >>> 1. find and create u

[COMMITTED] i386: Move stack protector patterns above mov $0 -> xor peephole

2023-11-02 Thread Uros Bizjak
Move stack protector patterns above mov $0,%reg -> xor %reg,%reg so the latter won't interfere with stack protector peephole2s. gcc/ChangeLog: * config/i386/i386.md: Move stack protector patterns above mov $0,%reg -> xor %reg,%reg peephole2 pattern. Bootstrapped and regression tested on

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Andreas Schwab
On Nov 02 2023, Jonathan Wakely wrote: > Git tags are cheap, but I can imagine a concern about hundreds of new > tags "littering" the output of 'git tag -l'. I don't _think_ you can > put tags under an alternative ref that isn't fetched by default (as we > do with refs/users and refs/vendor). I th

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 9:27 AM Jakub Jelinek wrote: > > On Thu, Nov 02, 2023 at 08:57:36AM +0100, Richard Biener wrote: > > You probably want to specify that when a pointer to the array is taken the > > pointer has to be to the first array element (or do we want to mangle the > > 'size' accordingl

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: > > Say 'memory lifetime' rather than 'memory life' as lifetime is the more > standard term nowadays (indeed we have e.g. -fno-lifetime-dse). > > It's also easier to grep for if someone is looking for the documentation on > where we do that. OK >

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Jonathan Wakely
On Thu, 2 Nov 2023 at 10:23, Andreas Schwab wrote: > > On Nov 02 2023, Jonathan Wakely wrote: > > > Git tags are cheap, but I can imagine a concern about hundreds of new > > tags "littering" the output of 'git tag -l'. I don't _think_ you can > > put tags under an alternative ref that isn't fetched

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Sam James
Richard Biener writes: > On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: >> >> Say 'memory lifetime' rather than 'memory life' as lifetime is the more >> standard term nowadays (indeed we have e.g. -fno-lifetime-dse). >> >> It's also easier to grep for if someone is looking for the documentat

[PATCH] tree-optimization/112320 - bougs debug IL after SCCP

2023-11-02 Thread Richard Biener
The following addresses wrong debug IL created by SCCP rewriting stmts to defined overflow. I addressed another inefficiency there but needed to adjust the API of rewrite_to_defined_overflow for this which is now taking a stmt iterator for in-place operation and a stmt for sequence producing becau

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 11:18:09AM +0100, Richard Biener wrote: > > Or, if we want to pay further price, .ACCESS_WITH_SIZE could take as one of > > the arguments not the size value, but its address. Then at __bdos time > > we would dereference that pointer to get the size. > > So, > > struct S { i

Re: [committed] libstdc++: Minor update to installation docs

2023-11-02 Thread Jonathan Wakely
On Wed, 1 Nov 2023 at 22:11, Gerald Pfeifer wrote: > > On Mon, 18 Sep 2023, Jonathan Wakely via Gcc-patches wrote: > > @@ -103,8 +103,10 @@ ln -s libiconv-1.16 libiconv > > > > If GCC 3.1.0 or later on is being used on GNU/Linux, an attempt > > will be made to use "C" librar

Re: [tree-optimization/111721] VECT: Support SLP for MASK_LEN_GATHER_LOAD with dummy mask

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, Juzhe-Zhong wrote: > This patch fixes following FAILs for RVV: > 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" > > Boots

[PATCH] RISC-V: Fix bug of AVL propagation PASS

2023-11-02 Thread Juzhe-Zhong
A run FAIL suddenly shows up today to me: FAIL: gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-11.c execution test that I didn't have before. After investigation, I realize that there is a bug in AVL propagtion PASS. gcc/ChangeLog: * config/riscv/riscv-avlprop.cc (pa

Re: [PATCH] RISC-V: Fix bug of AVL propagation PASS

2023-11-02 Thread Robin Dapp
LGTM. Regards Robin

RE: [PATCH] RISC-V: Fix bug of AVL propagation PASS

2023-11-02 Thread Li, Pan2
Committed, thanks Robin. Pan -Original Message- From: Robin Dapp Sent: Thursday, November 2, 2023 7:34 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] RISC-V: Fix bug of AVL pr

[PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread pan2 . li
From: Pan Li The previous rounding API start with i/l/ll only works on the same mode types. For example as below, and we arrange the iterator similar to fcvt. * SF => SI * DF => DI After we refined this limination from middle-end, these API can also vectorized with different type sizes, aka: *

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 11:25 AM Sam James wrote: > > > Richard Biener writes: > > > On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: > >> > >> Say 'memory lifetime' rather than 'memory life' as lifetime is the more > >> standard term nowadays (indeed we have e.g. -fno-lifetime-dse). > >> > >> It

[AVR PATCH] Optimize (X>>C)&1 for C in [1, 4, 8, 16, 24] in *insv.any_shift..

2023-11-02 Thread Roger Sayle
This patch optimizes a few special cases in avr.md's *insv.any_shift. instruction. This template handles tests for a single bit, where the result has only a (different) single bit set in the result. Usually (currently) this always requires a three-instruction sequence of a BST, a CLR and a BLD (

[AVR PATCH] Improvements to SImode and PSImode shifts by constants.

2023-11-02 Thread Roger Sayle
This patch provides non-looping implementations for more SImode (32-bit) and PSImode (24-bit) shifts on AVR. For most cases, these are shorter and faster than using a loop, but for a few (controlled by optimize_size) they are a little larger but significantly faster, The approach is to perform b

Re: Re: [tree-optimization/111721] VECT: Support SLP for MASK_LEN_GATHER_LOAD with dummy mask

2023-11-02 Thread juzhe.zh...@rivai.ai
Thanks Richi. The following is the V2 patch: Testing on X86 and aarch64 are running. diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 43d742e3c92..e7f7f976f11 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -760,7 +760,7 @@ vect_get_and_check_slp_defs (vec_info *vinf

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 11:40 AM Jakub Jelinek wrote: > > On Thu, Nov 02, 2023 at 11:18:09AM +0100, Richard Biener wrote: > > > Or, if we want to pay further price, .ACCESS_WITH_SIZE could take as one > > > of > > > the arguments not the size value, but its address. Then at __bdos time > > > we w

Re: [PATCH] doc: explicitly say 'lifetime' for DCE

2023-11-02 Thread Sam James
Richard Biener writes: > On Thu, Nov 2, 2023 at 11:25 AM Sam James wrote: >> >> >> Richard Biener writes: >> >> > On Thu, Nov 2, 2023 at 10:03 AM Sam James wrote: >> >> >> >> Say 'memory lifetime' rather than 'memory life' as lifetime is the more >> >> standard term nowadays (indeed we have

Re: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread juzhe.zhong
lgtm Replied Message Frompan2...@intel.comDate11/02/2023 19:48 Togcc-patches@gcc.gnu.org Ccjuzhe.zh...@rivai.ai,pan2...@intel.com,yanzhang.w...@intel.com,kito.ch...@gmail.comSubject[PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 12:52:50PM +0100, Richard Biener wrote: > > What I meant is to emit > > tmp_4 = .ACCESS_WITH_SIZE (&s.b[0], &s.a, (typeof (&s.a)) 0); > > p_5 = &tmp_4[2]; > > i.e. don't associate the pointer with a value of the size, but with > > an address where to find the size (plus how

RE: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator

2023-11-02 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zhong Sent: Thursday, November 2, 2023 8:04 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; Li, Pan2 ; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] RISC-V: Refactor prefix [I/L/LL] rounding API autovec iterator lgtm Replied Message

RE: [PATCH v1] EXPMED: Allow vector mode for DSE extract_low_bits [PR111720]

2023-11-02 Thread Li, Pan2
Thanks Richard B for comments. > when there are integer modes for the vector modes you now go a different path, > a little less "regressing" would be to write it as > > if (int_mode_for_mode (src_mode).exists (&src_int_mode) >&& int_mode_for_mode (mode).exists (&int_mode)) > { >

[pushed] analyzer: fix clang warnings [PR112317]

2023-11-02 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-5080-gc71028c979d55f. gcc/analyzer/ChangeLog: PR analyzer/112317 * access-diagram.cc (class x_aligned_x_ruler_widget): Eliminate unused field "m_col_widths"

[PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread Maxim Kuvyrkov
... to restore compatability with validate_failures.py . The testsuite script validate_failures.py expects "Running ..." to extract values, and gotools.sum provided "Running ". Note that libgo.sum, which also uses Makefile logic to generate DejaGnu-like output, already has "..." suffix. gotools

Re: [PATCH] A new copy propagation and PHI elimination pass

2023-11-02 Thread Filip Kastl
Hi, thanks for the guidance. I'm going to post a new version of the patch with the testcase modified so that it searches for 'return 9;' instead of '= 9;'. Filip Kastl On Fri 2023-10-27 13:55:37, Jeff Law wrote: > > > On 10/20/23 07:52, Filip Kastl wrote: > > On Fri 2023-10-20 15:50:25, Fili

[PATCH v2] A new copy propagation and PHI elimination pass

2023-11-02 Thread Filip Kastl
> Hi, > > this is a patch that I submitted two months ago as an RFC. I added some polish > since. > > It is a new lightweight pass that removes redundant PHI functions and as a > bonus does basic copy propagation. With Jan Hubička we measured that it is > able > to remove usually more than 5% of

Re: Re: [tree-optimization/111721] VECT: Support SLP for MASK_LEN_GATHER_LOAD with dummy mask

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, juzhe.zh...@rivai.ai wrote: > Thanks Richi. > > The following is the V2 patch: > Testing on X86 and aarch64 are running. > > diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc > index 43d742e3c92..e7f7f976f11 100644 > --- a/gcc/tree-vect-slp.cc > +++ b/gcc/tree-vect-slp

[PATCH/RFC 0/4] C/C++/diagnostics: various UX improvements

2023-11-02 Thread David Malcolm
The following patch kit implements the: #pragma GCC show_layout (struct foo) idea I mentioned in my Cauldron talk (in patch 2), and the other patches implement various related user experience changes I came across when implementing it. Patch 1 reworks how c-pragma.cc parses pragmas, and experim

[PATCH 3/4] diagnostics: add automatic URL-ification within messages

2023-11-02 Thread David Malcolm
In r10-3781-gd26082357676a3 GCC's pretty-print framework gained the ability to emit embedding URLs via escape sequences for marking up text output.. In r10-3783-gb4c7ca2ef3915a GCC started using this for the [-Wname-of-option] emitted at the end of each diagnostic so that it becomes a hyperlink to

[PATCH 2/4] c: add #pragma GCC show_layout

2023-11-02 Thread David Malcolm
This patch adds a new pragma to the C frontend that will make it emit a human-readable diagram of a struct's layout. For example, given this contrived usage: struct example { char foo : 7; char bar; char visible : 1; char active : 1; }; the compiler will emit output similar to the follo

[PATCH 1/4] c/c++: rework pragma parsing

2023-11-02 Thread David Malcolm
This patch reworks pragma parsing in c-pragma.cc, with the following improvements: - it replaces the GCC_BAD* macros (that contained "return") in favor of helper classes and functions for emitting diagnostics, making control flow more explicit - the -Wpragmas diagnostics are reworded from the for

Re: [PATCH 01/12] [contrib] validate_failures.py: Avoid testsuite aliasing

2023-11-02 Thread Maxim Kuvyrkov
Patch proposed at https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635000.html -- Maxim Kuvyrkov https://www.linaro.org > On Sep 27, 2023, at 18:47, Maxim Kuvyrkov wrote: > > Hi Bernhard, > > Thanks, I meant to fix this, but forgot. > > The underlying problem here is that we want to de

[committed] Improve H8 sequences for single bit sign extractions

2023-11-02 Thread Jeff Law
Spurred by Roger's recent work on ARC, this patch improves the code we generation for single bit sign extractions. The basic idea is to get the bit we want into C, the use a subx;ext.w;ext.l sequence to sign extend it in a GPR. For bits 0..15 we can use a bld instruction to get the bit we wan

Re: [PATCH] internal-fn: Add VCOND_MASK_LEN.

2023-11-02 Thread Richard Biener
On Thu, 26 Oct 2023, Robin Dapp wrote: > Ok, next try. Now without dubious pattern and with direct optab > but still dedicated expander function. > > This will cause one riscv regression in cond_widen_reduc-2.c that > we can deal with later. It is just a missed optimization where > we do not co

Re: [PATCH] internal-fn: Add VCOND_MASK_LEN.

2023-11-02 Thread Robin Dapp
> Looks reasonable overall. The new match patterns are 1:1 the > same as the COND_ ones. That's a bit awkward, but I don't see > a good way to "macroize" stuff further there. Can you at least > interleave the COND_LEN_* ones with the other ones instead of > putting them all at the end? Yes, no

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
> On Nov 2, 2023, at 3:57 AM, Richard Biener wrote: > > On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: >> >> >> >>> On Oct 31, 2023, at 6:14 PM, Joseph Myers wrote: >>> >>> On Tue, 31 Oct 2023, Qing Zhao wrote: >>> 2.3 A new semantic requirement in the user documentation of "counte

Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread Richard Biener
On Tue, 31 Oct 2023, Juzhe-Zhong wrote: > As previous Richard's suggested, we should support strided load/store in > loop vectorizer instead hacking RISC-V backend. > > This patch adds MASK_LEN_STRIDED LOAD/STORE OPTABS/IFN. > > The GIMPLE IR is same as mask_len_gather_load/mask_len_scatter_stor

[committed] libstdc++: Fix warning during configure

2023-11-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The checks for snprintf give a -Wformat warning due to a missing argument. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_C99): Fix snprintf checks. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 4 ++-- libstdc++

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Richard Biener
On Thu, Nov 2, 2023 at 2:50 PM Qing Zhao wrote: > > > > > On Nov 2, 2023, at 3:57 AM, Richard Biener > > wrote: > > > > On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > >> > >> > >> > >>> On Oct 31, 2023, at 6:14 PM, Joseph Myers wrote: > >>> > >>> On Tue, 31 Oct 2023, Qing Zhao wrote: > >>>

[committed] d: Merge upstream dmd, druntime 643b1261bb, phobos 1c98326e7

2023-11-02 Thread Iain Buclaw
Hi, This patch merges the D front-end and runtime library with upstream dmd 643b1261bb, and standard library with phobos 1c98326e7. Synchronizing with the v2.106.0-beta.1 release. This is being done a little earlier than usual as there's a lot of internal moving code around within upstream at th

[committed] c: Add missing conditions in Walloc-size to avoid ICEs [PR112347]

2023-11-02 Thread Uecker, Martin
I forget to guard against some more cases.  Committed as obvious. Martin c: Add missing conditions in Walloc-size to avoid ICEs [PR112347] Fix ICE because of forgotten checks for pointers to void and incomplete arrays. Committed as obvious. PR c/1123

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Martin Uecker
Am Donnerstag, dem 02.11.2023 um 13:50 + schrieb Qing Zhao: > > > On Nov 2, 2023, at 3:57 AM, Richard Biener > > wrote: > > > > On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > > > > > > > > > > > > > On Oct 31, 2023, at 6:14 PM, Joseph Myers > > > > wrote: > > > > > > > > On Tue, 3

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread 钟居哲
Ok. So drop 'scale' and keep signed/unsigned argument, is that right? And I wonder I should create the stride_type using size_type_node or ptrdiff_type_node ? Which is preferrable ? Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-11-02 22:27 To: 钟居哲 CC: gcc-patches; Jeff Law; ri

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread 钟居哲
Hi, Richi. >> Do we really need to have two modes for the optab though or could we >> simply require the target to support arbitrary offset modes (give it >> is implicitly constrained to ptr_mode for the base already)? Or >> properly extend/truncate the offset at expansion time, say to ptr_mode >

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, ??? wrote: > Ok. So drop 'scale' and keep signed/unsigned argument, is that right? I don't think we need signed/unsigned. RTL expansion has the signedness of the offset argument there and can just extend to the appropriate mode to offset a pointer. > And I wonder I should cr

Re: Re: [PATCH V2] OPTABS/IFN: Add mask_len_strided_load/mask_len_strided_store OPTABS/IFN

2023-11-02 Thread Richard Biener
On Thu, 2 Nov 2023, ??? wrote: > Hi, Richi. > > >> Do we really need to have two modes for the optab though or could we > >> simply require the target to support arbitrary offset modes (give it > >> is implicitly constrained to ptr_mode for the base already)? Or > >> properly extend/truncate the

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
> On Nov 2, 2023, at 9:54 AM, Richard Biener wrote: > > On Thu, Nov 2, 2023 at 2:50 PM Qing Zhao wrote: >> >> >> >>> On Nov 2, 2023, at 3:57 AM, Richard Biener >>> wrote: >>> >>> On Wed, Nov 1, 2023 at 3:47 PM Qing Zhao wrote: > On Oct 31, 2023, at 6:14 PM, Joseph

[PATCH] libstdc++: Improve static assert messages for monadic operations

2023-11-02 Thread Jonathan Wakely
Any objections or suggestions for better wording? Tested x86_64-linux. -- >8 -- The monadic operations for std::optional and std::expected make use of internal helper traits __is_optional nad __is_expected, which are not very user-friendly when shown in diagnostics. Add messages to the assertion

[committed] libstdc++: Add assertion to std::string_view::remove_suffix [PR112314]

2023-11-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Backports seem reasonable. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/112314 * include/std/string_view (string_view::remove_suffix): Add debug assertion. * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/de

[PATCH] vect: allow using inbranch simdclones for masked loops

2023-11-02 Thread Andre Vieira (lists)
Hi, In a previous patch I did most of the work for this, but forgot to change the check for number of arguments matching between call and simdclone. This check should accept calls without a mask to be matched against simdclones with mask arguments. I also added tests to verify this feature

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

2023-11-02 Thread Marek Polacek
On Thu, Nov 02, 2023 at 11:28:43AM -0400, Marek Polacek wrote: > On Sat, Oct 14, 2023 at 12:56:11AM -0400, Jason Merrill wrote: > > As discussed above, we probably don't want to exclude implicitly-declared > > special member functions. > > Done (but removing the DECL_ARTIFICIAL check). s/but/by/

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

2023-11-02 Thread Marek Polacek
On Sat, Oct 14, 2023 at 12:56:11AM -0400, Jason Merrill wrote: > On 10/10/23 13:20, Marek Polacek wrote: > > Thanks for looking into this. It's kept me occupied for quite a while. > > Thanks, nice work. > > > On Tue, Aug 29, 2023 at 03:26:46PM -0400, Jason Merrill wrote: > > > On 8/23/23 15:49,

Re: [PATCH V2] RISC-V: Fix redundant vsetvl in fixed-vlmax vectorized codes[PR112326]

2023-11-02 Thread Robin Dapp
Hi Juzhe, in principle this LGTM. It could use some function comments, though ;) > +imm_avl_p (machine_mode mode) > { >poly_uint64 nuints = GET_MODE_NUNITS (mode); > >return nuints.is_constant () > -/* The vsetivli can only hold register 0~31. */ > -? (IN_RANGE (nuints.to_cons

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Siddhesh Poyarekar
On 2023-11-02 10:12, Martin Uecker wrote: This shouldn't be necessary. The object-size pass can track pointer arithmeti if it comes after inserting the .ACCESS_WITH_SIZE. https://godbolt.org/z/fvc3aoPfd The problem is dependency tracking through the pointer arithmetic, which Jakub suggested t

[PATCH V3 2/6] aarch64: Add support for aarch64-sys-regs.def

2023-11-02 Thread Victor Do Nascimento
This patch defines the structure of a new .def file used for representing the aarch64 system registers, what information it should hold and the basic framework in GCC to process this file. Entries in the aarch64-system-regs.def file should be as follows: SYSREG (NAME, CPENC (sn,op1,cn,cm,op2),

[PATCH V3 1/6] aarch64: Sync system register information with Binutils

2023-11-02 Thread Victor Do Nascimento
This patch adds the `aarch64-sys-regs.def' file, originally written for Binutils, to GCC. In so doing, it provides GCC with the necessary information for teaching the compiler about system registers known to the assembler and how these can be used. By aligning the representation of data common to

[PATCH V3 3/6] aarch64: Implement system register validation tools

2023-11-02 Thread Victor Do Nascimento
Given the implementation of a mechanism of encoding system registers into GCC, this patch provides the mechanism of validating their use by the compiler. In particular, this involves: 1. Ensuring a supplied string corresponds to a known system register name. System registers can be access

[PATCH V3 0/6] aarch64: Add support for __arm_rsr and __arm_wsr ACLE function family

2023-11-02 Thread Victor Do Nascimento
Implement changes resulting from upstream discussion about the implementation as presented in V2 of this patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633458.html Note that patch 4/7 of the previous iteration of this series (Add basic target_print_operand support for CONST_STRING)

[PATCH V3 6/6] aarch64: Add system register duplication check selftest

2023-11-02 Thread Victor Do Nascimento
Add a build-time test to check whether system register data, as imported from `aarch64-sys-reg.def' has any duplicate entries. Duplicate entries are defined as any two SYSREG entries in the .def file which share the same encoding values (as specified by its `CPENC' field) and where the relationshi

[PATCH V3 4/6] aarch64: Implement system register r/w arm ACLE intrinsic functions

2023-11-02 Thread Victor Do Nascimento
Implement the aarch64 intrinsics for reading and writing system registers with the following signatures: uint32_t __arm_rsr(const char *special_register); uint64_t __arm_rsr64(const char *special_register); void* __arm_rsrp(const char *special_register); float __arm

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread rep . dot . nop
Hi Maxim! Many thanks for the patch! Quick question below.. On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov wrote: >... to restore compatability with validate_failures.py . >The testsuite script validate_failures.py expects >"Running ..." to extract values, >and gotools.sum provided "Running

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread Maxim Kuvyrkov
> On Nov 2, 2023, at 21:02, rep.dot@gmail.com wrote: > > Hi Maxim! > > Many thanks for the patch! Quick question below.. > > On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov > wrote: >> ... to restore compatability with validate_failures.py . >> The testsuite script validate_failures.py exp

[PATCH V3 5/6] aarch64: Add front-end argument type checking for target builtins

2023-11-02 Thread Victor Do Nascimento
In implementing the ACLE read/write system register builtins it was observed that leaving argument type checking to be done at expand-time meant that poorly-formed function calls were being "fixed" by certain optimization passes, meaning bad code wasn't being properly picked up in checking. Exampl

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread Rainer Orth
rep.dot@gmail.com writes: > On 2 November 2023 18:06:54 CET, Maxim Kuvyrkov > wrote: >>> On Nov 2, 2023, at 21:02, rep.dot@gmail.com wrote: >>> >>> Hi Maxim! >>> >>> Many thanks for the patch! Quick question below.. >>> >>> On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov >>> wrote: [.

Re: [Patch, fortran] PR98498 - Interp request: defined operators and unlimited polymorphic

2023-11-02 Thread Paul Richard Thomas
Hi Harald, I was overthinking the problem. The rejected cases led me to a fix that can only be described as a considerable simplification compared with the first patch! The testcase now reflects the requirements of the standard and regtests without failures. OK for mainline? Thanks Paul Fortr

Re: [PATCH] Format gotools.sum closer to what DejaGnu does

2023-11-02 Thread rep . dot . nop
On 2 November 2023 18:06:54 CET, Maxim Kuvyrkov wrote: >> On Nov 2, 2023, at 21:02, rep.dot@gmail.com wrote: >> >> Hi Maxim! >> >> Many thanks for the patch! Quick question below.. >> >> On 2 November 2023 13:48:55 CET, Maxim Kuvyrkov >> wrote: >>> ... to restore compatability with valid

Re: [PATCH 3/4] maintainer-scripts/gcc_release: use HTTPS for links

2023-11-02 Thread Joseph Myers
On Thu, 2 Nov 2023, Sam James wrote: > maintainer-scripts/ > * gcc_release: Use HTTPS for links. OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 4/4] maintainer-scripts/gcc_release: cleanup whitespace

2023-11-02 Thread Joseph Myers
On Thu, 2 Nov 2023, Sam James wrote: > maintainer-scripts/ > * gcc_release: Cleanup whitespace. OK. -- Joseph S. Myers jos...@codesourcery.com

[PATCH] gfortran: Rely on dg-do-what-default to avoid running pr85853.f90, pr107254.f90 and vect-alias-check-1.F90 on non-vector targets

2023-11-02 Thread Patrick O'Neill
Testcases in gfortran.dg/vect/vect.exp rely on check_vect_support_and_set_flags to set dg-do-what-default and avoid running vector tests on non-vector targets. The three testcases in this patch overwrite the default with dg-do run which causes issues for non-vector targets. Removing the dg-do run

[PATCH] libstdc++: avoid uninitialized read in basic_string constructor

2023-11-02 Thread Ben Sherman
Tested on x86_64-pc-linux-gnu, please let me know if there's anything else needed. I haven't contributed before and don't have write access, so apologies if I've missed anything. -- >8 -- The basic_string input iterator constructor incrementally reads data and allocates the internal buffer as-nee

[pushed] c++: retval dtor on rethrow [PR112301]

2023-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In r12-6333 for PR33799, I fixed the example in [except.ctor]/2. In that testcase, the exception is caught and the function returns again, successfully. In this testcase, however, the exception is rethrown, and hits two separate cleanups:

[pushed] c++: use hash_set in nrv_data

2023-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I noticed we were using a hash_table directly here instead of the simpler hash_set interface. Also, let's check for the variable itself and repeats earlier, since they should happen more often than any of the other cases. gcc/cp/ChangeLog:

Re: [Patch, fortran] PR98498 - Interp request: defined operators and unlimited polymorphic

2023-11-02 Thread Harald Anlauf
Hi Paul, Am 02.11.23 um 19:18 schrieb Paul Richard Thomas: Hi Harald, I was overthinking the problem. The rejected cases led me to a fix that can only be described as a considerable simplification compared with the first patch! this patch is *much* simpler, makes more sense, and works here. :

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
Thanks a lot for raising these issues. If I understand correctly, the major question we need to answer is: For the following example: (Jakub mentioned this in an early message) 1 struct S { int a; char b __attribute__((counted_by (a))) []; }; 2 struct S s; 3 s.a = 5; 4 char *p = &s.b[

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Qing Zhao
> On Nov 2, 2023, at 7:52 AM, Richard Biener wrote: > > On Thu, Nov 2, 2023 at 11:40 AM Jakub Jelinek wrote: >> >> On Thu, Nov 02, 2023 at 11:18:09AM +0100, Richard Biener wrote: Or, if we want to pay further price, .ACCESS_WITH_SIZE could take as one of the arguments not the size v

  1   2   >