[PATCH] aarch64: Optimize SVE extract last to Neon lane extract for 128-bit VLS.

2025-04-25 Thread Jennifer Schmitz
For the test case int32_t foo (svint32_t x) { svbool_t pg = svpfalse (); return svlastb_s32 (pg, x); } compiled with -O3 -mcpu=grace -msve-vector-bits=128, GCC produced: foo: pfalse p3.b lastb w0, p3, z0.s ret when it could use a Neon lane extract instead: foo:

[committed] libstdc++: Replace leftover std::queue with Adaptor in ranges/adaptors.cc tests.

2025-04-25 Thread Tomasz Kamiński
This was leftover from work-in-progress state, where only std::queue was tested. libstdc++-v3/ChangeLog: * testsuite/std/format/ranges/adaptors.cc: Updated test. --- Tested on x86_64-linux. libstdc++-v3/testsuite/std/format/ranges/adaptors.cc | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH] c++/modules: Ensure DECL_FRIEND_CONTEXT is streamed [PR119939]

2025-04-25 Thread Nathaniel Shead
Tested so far on x86_64-pc-linux-gnu (just modules.exp), OK for trunk/15 if full bootstrap+regtest succeeds? A potentially safer approach that would slightly bloat out the size of the built modules would be to always stream this variable rather than having any conditions, but from what I can tell

[wwwdocs] gcc-15: Add changes for Rust frontend

2025-04-25 Thread arthur . cohen
From: Arthur Cohen Content was validated using the Nu HTML checker per the contributing doc. --- htdocs/gcc-15/changes.html | 57 ++ 1 file changed, 57 insertions(+) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index 3e3c6655..10b1ce

Re: [PATCH,LRA] Do inheritance transformations for any optimization [PR118591]

2025-04-25 Thread Vladimir Makarov
On 4/19/25 3:29 PM, Denis Chertykov wrote: Bugfix for PR118591 This bug occurs only with '-Os' option. The function 'inherit_reload_reg ()' have a wrong condition: static bool inherit_reload_reg (bool def_p, int

[PATCH] AArch64: Optimize SVE loads/stores with ptrue predicates to unpredicated instructions.

2025-04-25 Thread Jennifer Schmitz
SVE loads and stores where the predicate is all-true can be optimized to unpredicated instructions. For example, svuint8_t foo (uint8_t *x) { return svld1 (svptrue_b8 (), x); } was compiled to: foo: ptrue p3.b, all ld1bz0.b, p3/z, [x0] ret but can be compiled to: foo

Re: [PATCH RFC] c++: bad pending_template recursion

2025-04-25 Thread Patrick Palka
On Fri, 18 Apr 2025, Jason Merrill wrote: > limit_bad_template_recursion currently avoids immediate instantiation of > templates from uses in an already ill-formed instantiation, but we still can > get unnecessary recursive instantiation in pending_templates if the > instantiation was queued befor

New French PO file for 'gcc' (version 15.1.0)

2025-04-25 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the French team of translators. The file is available at: https://translationproject.org/latest/gcc/fr.po (This file, 'gcc-15.1.0.fr.po', has jus

Re: [PATCH] simplify-rtx: Combine bitwise operations in more cases

2025-04-25 Thread Richard Sandiford
Pengfei Li writes: > This patch transforms RTL expressions of the form (subreg (not X) off) > into (not (subreg X off)) when the subreg is an operand of a bitwise AND > or OR. This transformation can expose opportunities to combine a NOT > operation with the bitwise AND/OR. > > For example, it imp

[PATCH] libstdc++: Add some makefile dependencies

2025-04-25 Thread Jonathan Wakely
This ensures that wstring-inst.o and similar files will be rebuilt when string-inst.cc changes. libstdc++-v3/ChangeLog: * src/c++11/Makefile.am: Add prerequisites for targets that depend on string-inst.cc. * src/c++11/Makefile.in: Regenerate. --- We could make a lot of ot

Re: [PATCH] OpenMP, GCN: Add interop-hsa testcase

2025-04-25 Thread Tobias Burnus
Andrew Stubbs wrote: This testcase ensures that the interop HSA support is sufficient to run a kernel manually on the same device. It reuses an OpenMP kernel in order to avoid all the complication of compiling a custom kernel in Dejagnu (although, this does mean matching the OpenMP runtime envir

[PATCH] s390: Allow 5+ argument tail-calls in some -m31 -mzarch special cases [PR119873]

2025-04-25 Thread Jakub Jelinek
Hi! Here is a patch to handle the PARALLEL case too. I think we can just use rtx_equal_p there, because it will always use SImode in the EXPR_LIST REGs in that case. Bootstrapped/regtested on s390x-linux, ok for trunk and 15.2 (with CALL_EXPR_MUST_TAIL_CALL (call_expr) && added in that case)? 20

Re: [PATCH v2] Document AArch64 changes for GCC 15

2025-04-25 Thread Kyrylo Tkachov
> On 25 Apr 2025, at 12:06, Richard Sandiford wrote: > > Kyrylo Tkachov writes: >> Hi Richard, >> >>> On 23 Apr 2025, at 13:47, Richard Sandiford >>> wrote: >>> >>> Thanks for all the feedback. I've tried to address it in the version >>> below. I'll push later today if there are no furth

Re: [PATCH] libstdc++: Minimalize temporary allocations when width is specified [PR109162]

2025-04-25 Thread Tomasz Kaminski
On Fri, Apr 25, 2025 at 11:49 AM Jonathan Wakely wrote: > On 23/04/25 13:56 +0200, Tomasz Kamiński wrote: > >When width parameter is specified for formatting range, tuple or escaped > >presentation of string, we used to format characters to temporary string, > >and write produce sequence padded a

Re: [PATCH] libstdc++: Add some makefile dependencies

2025-04-25 Thread Tomasz Kaminski
On Fri, Apr 25, 2025 at 12:55 PM Jonathan Wakely wrote: > This ensures that wstring-inst.o and similar files will be rebuilt when > string-inst.cc changes. > > libstdc++-v3/ChangeLog: > > * src/c++11/Makefile.am: Add prerequisites for targets that > depend on string-inst.cc. >

Re: [PATCH] s390: Allow 5+ argument tail-calls in some -m31 -mzarch special cases [PR119873]

2025-04-25 Thread Stefan Schulze Frielinghaus
On Fri, Apr 25, 2025 at 01:21:46PM +0200, Jakub Jelinek wrote: > Hi! > > Here is a patch to handle the PARALLEL case too. > I think we can just use rtx_equal_p there, because it will always use > SImode in the EXPR_LIST REGs in that case. > > Bootstrapped/regtested on s390x-linux, ok for trunk an

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-25 Thread Qing Zhao
> On Apr 24, 2025, at 19:56, Kees Cook wrote: > > > > On April 24, 2025 1:44:23 PM PDT, Qing Zhao wrote: >> >> >>> On Apr 24, 2025, at 15:43, Bill Wendling wrote: >>> >>> On Thu, Apr 24, 2025 at 8:15 AM Qing Zhao wrote: Hi, Kees reported a segmentation failure when

[PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-25 Thread Jennifer Schmitz
If -msve-vector-bits=128, SVE loads and stores (LD1 and ST1) with a ptrue predicate can be replaced by neon instructions (LDR and STR), thus avoiding the predicate altogether. This also enables formation of LDP/STP pairs. For example, the test cases svfloat64_t ptrue_load (float64_t *x) { svboo

Re: [committed] libstdc++: Replace leftover std::queue with Adaptor in ranges/adaptors.cc tests.

2025-04-25 Thread Jonathan Wakely
On Fri, 25 Apr 2025 at 15:31, Tomasz Kamiński wrote: > > This was leftover from work-in-progress state, where only std::queue was > tested. > > libstdc++-v3/ChangeLog: > > * testsuite/std/format/ranges/adaptors.cc: Updated test. > --- > Tested on x86_64-linux. OK for trunk and gcc-15. >

[PUSHED] phiopt: Remove calls.h include [PR119811]

2025-04-25 Thread Andrew Pinski
When the patch, https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660807.html was rewroked into r15-3047-g404d947d8ddd3c, the include for calls.h was still included and missed that it was no longer needed. Pushed as obvious. PR tree-optimization/119811 gcc/ChangeLog: * tre

[committed] cobol: New testcases.

2025-04-25 Thread Robert Dubner
Fifty-eight new testcases for COBOL. These cover a range of fundamental operations and data representation. >From 591831dcd4bc9cb9c089d952e73ec8bfcb6cb3fb Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Fri, 25 Apr 2025 10:19:35 -0400 Subject: [PATCH] cobol: New testca

Re: [committed] libstdc++: Replace leftover std::queue with Adaptor in ranges/adaptors.cc tests.

2025-04-25 Thread Jonathan Wakely
On Fri, 25 Apr 2025 at 15:41, Jonathan Wakely wrote: > > On Fri, 25 Apr 2025 at 15:31, Tomasz Kamiński wrote: > > > > This was leftover from work-in-progress state, where only std::queue was > > tested. > > > > libstdc++-v3/ChangeLog: > > > > * testsuite/std/format/ranges/adaptors.cc: Up

Re: [PATCH v3] RISC-V: Fix riscv_modes_tieable_p

2025-04-25 Thread Jeff Law
On 1/12/25 10:44 PM, Zhijin Zeng wrote: Compared to the patch v2, I added Zfinx check and Zfh check. Please help to review again. Thanks, Zhijin From 9ddb402cebe868050ebc2f75e4d87238161411b4 Mon Sep 17 00:00:00 2001 From: Zhijin Zeng Date: Sat, 11 Jan 2025 12:09:11 +0800 Subject: [PATCH]

New template for 'gcc' made available

2025-04-25 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. (If you have any questions, send them to .) A new POT file for textual domain 'gcc' has been made available to the language teams for translation. It is archived as: https://translationproject.org/POT-files/gcc

Re: [PATCH] aarch64: Optimize SVE extract last to Neon lane extract for 128-bit VLS.

2025-04-25 Thread Richard Sandiford
Jennifer Schmitz writes: > For the test case > int32_t foo (svint32_t x) > { > svbool_t pg = svpfalse (); > return svlastb_s32 (pg, x); > } > compiled with -O3 -mcpu=grace -msve-vector-bits=128, GCC produced: > foo: > pfalse p3.b > lastb w0, p3, z0.s > ret > when it could us

[pushed 2/2] c++: pruning non-captures in noexcept lambda [PR119764]

2025-04-25 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The patch for PR87185 fixed the ICE without fixing the underlying problem, that we were failing to find the declaration of the capture proxy that we are trying to decide whether to prune. Fixed by looking at the right index in stmt_list_sta

[Patch] nvptx/nvptx.opt: Update -march-map= for newer sm_xxx

2025-04-25 Thread Tobias Burnus
The idea of -march-map= is to simply and future proof select the best -march for a certain arch, without requiring that the compiler has support for it (like having a special multilib for it) - while -march= sets the actually used '.target' (and the compiler might actually generate specialized cod

Re: [PATCH 1/2] libstdc++: Add _M_key_compare helper to associative containers

2025-04-25 Thread Tomasz Kaminski
On Fri, Apr 25, 2025 at 12:19 AM Jonathan Wakely wrote: > In r10-452-ge625ccc21a91f3 I noted that we don't have an accessor for > invoking _M_impl._M_key_compare in the associative containers. That > meant that the static assertions to check for valid comparison functions > were squirrelled away

Re: [PATCH 2/2] libstdc++: Improve diagnostics for std::packaged_task invocable checks

2025-04-25 Thread Tomasz Kaminski
On Fri, Apr 25, 2025 at 12:20 AM Jonathan Wakely wrote: > Moving the static_assert that checks is_invocable_r_v into _Task_state > means it is checked when we instantiate that class template. > > Replacing the __create_task_state function with a static member function > _Task_state::_S_create ens

[committed] Adjust gcc_release for id href web transformations

2025-04-25 Thread Jakub Jelinek
Hi! We now have some script which transforms e.g. GCC 15.1 line in gcc-15/changes.html to GCC 15.1 This unfortunately breaks the gcc_release script, which looks for GCC 15.1 appearing in gennews after optional blanks from the start of the line in the NEWS file, which is no longer the case, there

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-25 Thread Hongtao Liu
> > I am not so sure about this when it come to relatively common > instructions. Hiding things in unspec prevents combine and other RTL > passes from doing their job. I would say that it only makes sense for > siutations where RTL equivalent is very inconvenient. > In the direction of using gener

Re: [PATCH 1/2] libstdc++: Add _M_key_compare helper to associative containers

2025-04-25 Thread Jonathan Wakely
On Fri, 25 Apr 2025 at 09:13, Tomasz Kaminski wrote: > > > > On Fri, Apr 25, 2025 at 12:19 AM Jonathan Wakely wrote: >> >> In r10-452-ge625ccc21a91f3 I noted that we don't have an accessor for >> invoking _M_impl._M_key_compare in the associative containers. That >> meant that the static assertio

Re: [PATCH] libstdc++: Constrain formatter for thread:id [PR119918]

2025-04-25 Thread Jonathan Wakely
s/thread:id/thread::id/ in the subject line On 24/04/25 12:50 +0200, Tomasz Kamiński wrote: This patch add constrains __formatter::__char to _CharT type parameter s/constrains/constraint/ of formatter specialization, matching the constrains same change here of formatting of integer/point

Re: [PATCH] libstdc++: Strip reference and cv-qual in range deduction guides for maps.

2025-04-25 Thread Jonathan Wakely
On Tue, 22 Apr 2025 at 08:13, Tomasz Kaminski wrote: > > The test cover constructors introduced in [PATCH v2] libstdc++-v3: Implement > missing allocator-aware constructors for unordered containers, > so I will merge that after. This change is OK for trunk now too. > > On Fri, Apr 18, 2025 at 5

Re: [PATCH v2] libstdc++-v3: Implement missing allocator-aware constructors for unordered containers.

2025-04-25 Thread Jonathan Wakely
On Fri, 18 Apr 2025 at 09:11, Tomasz Kamiński wrote: > > This patch implements remainder of LWG2713 (after r15-8293-g64f5c854597759) > by adding missing allocator aware version of unordered associative containers > constructors accepting pair of iterators or initializer_list, and > corresponding

[committed] libstdc++: Remove c++98_only dg-error

2025-04-25 Thread Jonathan Wakely
This fixes FAIL: 22_locale/ctype/is/string/89728_neg.cc -std=gnu++98 (test for errors, line ) Since r16-133-g8acea9ffa82ed8 we don't keep issuing more errors after the first one, so this dg-error no longer matches anything. libstdc++-v3/ChangeLog: * testsuite/22_locale/ctype/is/string

[PATCH] libstdc++: Rename std::latch data member

2025-04-25 Thread Jonathan Wakely
Rename _M_a to match the name of the exposition-only data member shown in the standard, i.e. 'counter'. libstdc++-v3/ChangeLog: * include/std/latch (latch::_M_a): Rename to _M_counter. --- IMHO this makes it a little easier to compare the implementation to the spec. Tested x86_64-linux.

RE: [PATCH 1/3][GCC16-Stage-1] RISC-V: Combine vec_duplicate + vadd.vv to vadd.vx on GR2VR cost

2025-04-25 Thread Li, Pan2
Thanks Jeff for comments. > The point is the separation isn't neat and clean in rtx_costs. We've > kind of let it go as-is with the vector short-cut out, but I don't think > that's really where we want to be, it was just an expedient decision to > allow us to focus on more important stuff. N

Re: [PATCH] libstdc++: Rename std::latch data member

2025-04-25 Thread Tomasz Kaminski
On Fri, Apr 25, 2025 at 1:51 PM Jonathan Wakely wrote: > Rename _M_a to match the name of the exposition-only data member shown > in the standard, i.e. 'counter'. > > libstdc++-v3/ChangeLog: > > * include/std/latch (latch::_M_a): Rename to _M_counter. > --- > > IMHO this makes it a little

Re: [PATCH v2] Document AArch64 changes for GCC 15

2025-04-25 Thread Richard Sandiford
Kyrylo Tkachov writes: > Hi Richard, > >> On 23 Apr 2025, at 13:47, Richard Sandiford >> wrote: >> >> Thanks for all the feedback. I've tried to address it in the version >> below. I'll push later today if there are no further comments. >> >> Richard >> >> >> The list is structured as: >>

[wwwdocs] Update documentation URL in robots.txt

2025-04-25 Thread Jonathan Wakely
--- Pushed to wwwdocs because the old URL gives a 404 error. htdocs/robots.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/robots.txt b/htdocs/robots.txt index 01ae43dd..526fa1dd 100644 --- a/htdocs/robots.txt +++ b/htdocs/robots.txt @@ -1,4 +1,4 @@ -# See http://ww

[wwwdocs v2] Document some more libstdc++ additions in gcc-15

2025-04-25 Thread Jonathan Wakely
--- Pushed to wwwdocs. htdocs/gcc-15/changes.html | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index 3cec4ff4..3e3c6655 100644 --- a/htdocs/gcc-15/changes.html +++ b/htdocs/gcc-15/changes.html

[PUSHED] Add 'libgomp.c-c++-common/target-cdtor-1.c'

2025-04-25 Thread Thomas Schwinge
libgomp/ * testsuite/libgomp.c-c++-common/target-cdtor-1.c: New. --- .../libgomp.c-c++-common/target-cdtor-1.c | 89 +++ 1 file changed, 89 insertions(+) create mode 100644 libgomp/testsuite/libgomp.c-c++-common/target-cdtor-1.c diff --git a/libgomp/testsuite/

GCN, nvptx offloading: Host/device compatibility: Itanium C++ ABI, DSO Object Destruction API [PR119853, PR119854]

2025-04-25 Thread Thomas Schwinge
Hi! On 2025-04-23T21:49:27+0200, I wrote: > [...] With 'libgomp.c++/target-cdtor-2.C' changed to 'dg-require-effective-target init_priority', and 'libgomp.c++/target-cdtor-1.C', 'libgomp.c++/target-cdtor-2.C' changed to scan for '__cxa_atexit' only for 'target cxa_atexit', I've pushed to trunk br

[PATCH] OpenMP, GCN: Add interop-hsa testcase

2025-04-25 Thread Andrew Stubbs
This testcase ensures that the interop HSA support is sufficient to run a kernel manually on the same device. It reuses an OpenMP kernel in order to avoid all the complication of compiling a custom kernel in Dejagnu (although, this does mean matching the OpenMP runtime environment, which might be

Re: [PATCH RFC] c++: bad pending_template recursion

2025-04-25 Thread Jonathan Wakely
On Thu, 24 Apr 2025 at 15:48, Jonathan Wakely wrote: > > On Fri, 18 Apr 2025 at 23:08, Jason Merrill wrote: > > > > limit_bad_template_recursion currently avoids immediate instantiation of > > templates from uses in an already ill-formed instantiation, but we still can > > get unnecessary recursi

Re: [PATCH] libstdc++: Minimalize temporary allocations when width is specified [PR109162]

2025-04-25 Thread Jonathan Wakely
On 23/04/25 13:56 +0200, Tomasz Kamiński wrote: When width parameter is specified for formatting range, tuple or escaped presentation of string, we used to format characters to temporary string, and write produce sequence padded according to the spec. However, once the estimated width of formatte

[committed] wwwdocs: Rotate news

2025-04-25 Thread Jakub Jelinek
Hi! I've committed the following patch to rotate news, chose to move 202{2,3}-ish items to news.html. We'll soon have 14.3/13.4 releases so the first column will be about the same length as the second. diff --git a/htdocs/index.html b/htdocs/index.html index 8bdc4071..a662ab09 100644 --- a/htdoc

[PATCH] c++/modules: Fix imported CNTTPs being considered non-constant [PR119938]

2025-04-25 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk/15? -- >8 -- When importing a CNTTP object, since r15-3031-g0b7904e274fbd6 we shortcut the processing of the generated NTTP so that we don't attempt to recursively load pendings. However, due to an oversight we do not properly set T

Re: [PATCHv2] modulo-sched: reject loop conditions when not decrementing with one [PR 116479]

2025-04-25 Thread Jakub Jelinek
On Fri, Apr 25, 2025 at 01:55:58PM +0100, Andre Vieira (lists) wrote: > Differences from v1: > > Made suggested changes to testcase and moved to target-agnostic area. > > gcc/ChangeLog: > > PR rtl-optimization/116479 > * modulo-sched.cc (doloop_register_get): Reject conditions with >

[PATCHv2] modulo-sched: reject loop conditions when not decrementing with one [PR 116479]

2025-04-25 Thread Andre Vieira (lists)
Differences from v1: Made suggested changes to testcase and moved to target-agnostic area. gcc/ChangeLog: PR rtl-optimization/116479 * modulo-sched.cc (doloop_register_get): Reject conditions with decrements that are not 1. gcc/testsuite/ChangeLog: * gcc.dg/pr1

Re: [PATCH] Add a bootstrap-native build config

2025-04-25 Thread Andi Kleen
On 2025-04-23 10:18, Richard Biener wrote: On Tue, Apr 22, 2025 at 5:43 PM Andi Kleen wrote: On 2025-04-22 13:22, Richard Biener wrote: > On Sat, Apr 12, 2025 at 5:09 PM Andi Kleen wrote: >> >> From: Andi Kleen >> >> ... that uses -march=native -mtune=native to build a compiler >> optimized

[pushed 1/2] c++: add -fabi-version=21

2025-04-25 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I'm about to add a bugfix that changes the ABI of noexcept lambdas, so first let's add the new ABI version. And I think it's time to update the compatibility version; let's bump to GCC 13, before the addition of concepts mangling. gcc/Chan

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-25 Thread Kees Cook
On Fri, Apr 25, 2025 at 04:56:52PM +, Qing Zhao wrote: > > > > On Apr 24, 2025, at 13:07, Kees Cook wrote: > > > > On Thu, Apr 24, 2025 at 04:36:14PM +, Qing Zhao wrote: > >> > >>> On Apr 24, 2025, at 11:59, Martin Uecker wrote: > >>> > >>> Am Donnerstag, dem 24.04.2025 um 15:15 +000

[PATCH] libstdc++: Fix _Padding_sink in case when predicted is between padwidht and maxwidth [PR109162]

2025-04-25 Thread Tomasz Kamiński
The _Padding_sink was behaving incorreclty, when the predicated width (based on code units counts) was higher than _M_maxwidth, but lower than _M_padwidth. In this case _M_update() returned without calling _M_force_update() and computing field width for Unicode encondings, because _M_buffering() r

[PATCH] Add m32c*-*-* to the list of obsolete targets

2025-04-25 Thread Iain Buclaw
Hi, This patch marks m32c*-*-* targets obsolete in GCC 16. The target has not had a maintainer since GCC 9 (r9-1950), and fails to compile even the simplest of functions since GCC 8 (r8-777, as reported in PR83670). OK for trunk? Regards, Iain. --- contrib/ChangeLog: * config-list.mk:

Re: [PATCH] c++/modules: Ensure DECL_FRIEND_CONTEXT is streamed [PR119939]

2025-04-25 Thread Jason Merrill
On 4/25/25 10:30 AM, Nathaniel Shead wrote: Tested so far on x86_64-pc-linux-gnu (just modules.exp), OK for trunk/15 if full bootstrap+regtest succeeds? OK. A potentially safer approach that would slightly bloat out the size of the built modules would be to always stream this variable rather

Re: [PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-25 Thread Richard Sandiford
Jennifer Schmitz writes: > If -msve-vector-bits=128, SVE loads and stores (LD1 and ST1) with a > ptrue predicate can be replaced by neon instructions (LDR and STR), > thus avoiding the predicate altogether. This also enables formation of > LDP/STP pairs. > > For example, the test cases > > svfloat

[PUSHED] gimple: Fix comment before gimple_cond_make_false/gimple_cond_make_true

2025-04-25 Thread Andrew Pinski
I noticed the comments and the code don't match. The correct form is: 'if (0 != 0)': false and 'if (1 != 0)': true That is always NE and always 0 as the second operand. Also there is a spello for statement in the comment in front of gimple_cond_true_p. Pushed as obvious. gcc/ChangeLog:

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-25 Thread Qing Zhao
> On Apr 25, 2025, at 13:18, Kees Cook wrote: > > On Fri, Apr 25, 2025 at 04:56:52PM +, Qing Zhao wrote: >> >> >>> On Apr 24, 2025, at 13:07, Kees Cook wrote: >>> >>> On Thu, Apr 24, 2025 at 04:36:14PM +, Qing Zhao wrote: > On Apr 24, 2025, at 11:59, Martin Uecker wrote:

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-25 Thread Bill Wendling
On Thu, Apr 24, 2025 at 4:56 PM Kees Cook wrote: > On April 24, 2025 1:44:23 PM PDT, Qing Zhao wrote: > >> On Apr 24, 2025, at 15:43, Bill Wendling wrote: > >> > >> On Thu, Apr 24, 2025 at 8:15 AM Qing Zhao wrote: > >>> > >>> Hi, > >>> > >>> Kees reported a segmentation failure when he used the

Re: [PATCH] tailcall: Support ERF_RETURNS_ARG for tailcall [PR67797]

2025-04-25 Thread Jakub Jelinek
On Sat, Apr 19, 2025 at 08:33:48PM -0700, Andrew Pinski wrote: > > + { > > + tree other_value = NULL_TREE; > > + /* If we have a function call that we know the return value is > > the same > > +as the argument, try the argument too. */ > > + int flags = gi

[PATCH] asf: Fix calling of emit_move_insn on registers of different modes [PR119884]

2025-04-25 Thread Konstantinos Eleftheriou
During the base register initialization, when we are eliminating the load instruction, we were calling `emit_move_insn` on registers of the same size but of different mode in some cases, causing an ICE. This patch fixes this, by adding a check for the modes to match before calling `emit_move_insn`

[committed v2] testsuite: Skip tests incompatible with generic thunk support

2025-04-25 Thread Dimitar Dimitrov
Some backends do not define TARGET_ASM_OUTPUT_MI_THUNK. But the generic thunk support cannot emit code for calling variadic methods of multiple-inheritance classes. Example error for pru-unknown-elf: .../gcc/gcc/testsuite/g++.dg/ipa/pr83549.C:7:24: error: generic thunk code fails for method 'v

Re: [PATCH] tailcall: Support ERF_RETURNS_ARG for tailcall [PR67797]

2025-04-25 Thread Andrew Pinski
On Fri, Apr 25, 2025 at 11:54 AM Jakub Jelinek wrote: > > On Sat, Apr 19, 2025 at 08:33:48PM -0700, Andrew Pinski wrote: > > > + { > > > + tree other_value = NULL_TREE; > > > + /* If we have a function call that we know the return value is > > > the same > > > +a

[committed v2] testsuite: Add require target for SJLJ exception implementation

2025-04-25 Thread Dimitar Dimitrov
Testcases for musttail call optimization fail on pru-unknown-elf: FAIL: c-c++-common/musttail14.c -std=gnu++17 (test for excess errors) Excess errors: .../gcc/gcc/testsuite/c-c++-common/musttail14.c:37:14: error: cannot tail-call: caller uses sjlj exceptions Silence these errors by disabli

Re: [PATCH] testsuite: Skip tests incompatible with generic thunk support

2025-04-25 Thread Dimitar Dimitrov
On Thu, Apr 24, 2025 at 11:56:52PM +0200, Bernhard Reutner-Fischer wrote: > > >>* lib/target-supports.exp > >>(check_effective_target_variadic_mi_thunk): New function. > >OK. > >jeff > > > > Please document new effective_target checks in sourcebuild.texi > > thanks Pushed with added doc

[pushed] wwwdocs: my GCC 15 changes

2025-04-25 Thread David Malcolm
I forgot to push this before going on vacation; sorry. Pushed to trunk. --- htdocs/gcc-15/changes.html | 260 +++- htdocs/gcc-15/diag-color-screenshot.png | Bin 0 -> 33062 bytes 2 files changed, 257 insertions(+), 3 deletions(-) create mode 100644 htdocs/gcc-15

Re: [PATCH] Fortran: fix procedure pointer handling with -fcheck=pointer [PR102900]

2025-04-25 Thread Harald Anlauf
Hi Jerry, Am 24.04.25 um 22:56 schrieb Jerry D: On 4/24/25 12:59 PM, Harald Anlauf wrote: Dear all, the attached patch is the result of my attempts to fix an ICE when compiling gfortran.dg/proc_ptr_52.f90 with -fcheck=all.  While trying to reduce this, I found several oddities with functions r

[PATCH] libstdc++: Replace AC_LANG_CPLUSPLUS with AC_LANG_PUSH

2025-04-25 Thread Jonathan Wakely
Autoconf documents AC_LANG_SAVE, AC_LANG_CPLUSPLUS etc. as deprecated. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_LANG_PUSH, GLIBCXX_LANG_POP): New macros to replace uses of AC_LANG_SAVE, AC_LANG_CPLUSPLUS, and AC_LANG_RESTORE. * configure: Regenerate. --- To

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-25 Thread Qing Zhao
> On Apr 24, 2025, at 13:07, Kees Cook wrote: > > On Thu, Apr 24, 2025 at 04:36:14PM +, Qing Zhao wrote: >> >>> On Apr 24, 2025, at 11:59, Martin Uecker wrote: >>> >>> Am Donnerstag, dem 24.04.2025 um 15:15 + schrieb Qing Zhao: Hi, Kees reported a segmentation failur

[PING][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-04-25 Thread Peter Frost
Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html Missed the version 15 freeze with the last ping, I believe the project is open for general development again now?

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-25 Thread Bill Wendling
[sorry for hijacking this thread] Does anyone have any response to Yeoul Na's suggestion to hold off on implementing __counted_by_expr() until the next C standards committee? https://discourse.llvm.org/t/rfc-bounds-safety-in-c-syntax-compatibility-with-gcc/85885/17?u=void I'm fine with it, bu

[committed] libstdc++: Remove c++26 dg-error lines for -Wdelete-incomplete errors

2025-04-25 Thread Jonathan Wakely
This fixes: FAIL: tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc -std=gnu++26 (test for errors, line 283) FAIL: tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc -std=gnu++26 (test for errors, line 305) This is another consequence of r16-133-g8acea9ffa82ed8 which prevents the -Wdele

[committed] libstdc++: Micro-optimization for std::addressof

2025-04-25 Thread Jonathan Wakely
Currently std::addressof calls std::__addressof which uses __builtin_addressof. This leads to me prefering std::__addressof in some code, to avoid the extra hop. But it's not as though the implementation of std::__addressof is complicated and reusing it avoids any code duplication. So let's just m

[committed] libstdc++: Use markdown in some Doxygen comments

2025-04-25 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/ptr_traits.h (to_address): Use markdown for formatting in Doxygen comments. --- Pushed to trunk. libstdc++-v3/include/bits/ptr_traits.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/bits/ptr_

[PATCH] libstdc++: Use 'if constexpr' to slightly simplify

2025-04-25 Thread Jonathan Wakely
This will hardly make a dent in the very slow compile times for but it seems worth doing anyway. libstdc++-v3/ChangeLog: * include/bits/regex_compiler.h (_AnyMatcher::operator()): Replace tag dispatching with 'if constexpr'. (_AnyMatcher::_M_apply): Remove both overloads.

Re: [EXT] Re: [PATCH] RISC-V: Add tt-ascalon-d8 integer and floating point scheduling model

2025-04-25 Thread Anton Blanchard
Hi Jeff, On Fri, Apr 25, 2025 at 6:04 AM Jeff Law wrote: > > On 4/24/25 2:37 AM, Anton Blanchard wrote: > > Add integer and floating point scheduling models for the Tenstorrent > > Ascalon 8 wide CPU. > > > > gcc/ChangeLog: > > * config/riscv/riscv-cores.def (RISCV_TUNE): Update. > >

[PATCH 3/3] aarch64: Add more vector permute tests for the FMOV optimization [PR100165]

2025-04-25 Thread Pengxuan Zheng
This patch adds more tests for vector permutes which can now be optimized as FMOV with the generic PERM change and the aarch64 AND patch. PR target/100165 gcc/testsuite/ChangeLog: * gcc.target/aarch64/fmov-3.c: New test. * gcc.target/aarch64/fmov-4.c: New test. *

[PATCH 2/3] aarch64: Optimize AND with certain vector of immediates as FMOV [PR100165]

2025-04-25 Thread Pengxuan Zheng
We can optimize AND with certain vector of immediates as FMOV if the result of the AND is as if the upper lane of the input vector is set to zero and the lower lane remains unchanged. For example, at present: v4hi f_v4hi (v4hi x) { return x & (v4hi){ 0x, 0x, 0, 0 }; } generates: f_v4h

[PATCH 1/3] Recognize vector permute patterns which can be interpreted as AND [PR100165]

2025-04-25 Thread Pengxuan Zheng
Certain permute that blends a vector with zero can be interpreted as an AND of a mask. This idea was suggested by Richard Sandiford when he was reviewing my patch which tries to optimizes certain vector permute with the FMOV instruction for the aarch64 target. Canonicalizing this class of vector pe

RE: [PATCH v3] aarch64: Recognize vector permute patterns suitable for FMOV [PR100165]

2025-04-25 Thread quic_pzheng
> Richard Sandiford writes: > > I think this would also simplify the evpc detection, since the > > requirement for using AND is the same for big-endian and > > little-endian, namely that index I of the result must either come from > > index I of the nonzero vector or from any element of the zero v