[PATCH] bpf: Add documentation for the -mcpu option

2024-02-15 Thread Will Hawkins
Add documentation describing the meaning and values for the -mcpu command-line option. Tested for bpf-unknown-none on x86_64-linux-gnu host. gcc/ChangeLog: * config/bpf/bpf.opt: Add help information for -mcpu. Signed-off-by: Will Hawkins --- gcc/config/bpf/bpf.opt | 2 ++ 1 file

[PATCH 2/2 V2] rs6000: Load store fusion for rs6000 target using common infrastructure

2024-02-15 Thread Ajit Agarwal
Hello All: This patch is for load store fusion for rs6000 target using common infrastructure. Common infrastructure using generic code for load store fusion of rs6000 target. Generic code are implemented and defined that can be used in target specific code for aarch64 and rs6000 target.

Re: [PATCH] RISC-V: Add new option -march=help to print all supported extensions

2024-02-15 Thread Kito Cheng
Thanks for the test and review, pushed :) On Thu, Feb 15, 2024 at 6:43 PM Christoph Müllner wrote: > > On Thu, Feb 15, 2024 at 10:56 AM Kito Cheng wrote: > > > > The output of -march=help is like below: > > > > ``` > > All available -march extensions for RISC-V: > > Name

Re: [PATCH v5 13/14] c++: Implement __rank built-in trait

2024-02-15 Thread Ken Matsui
On Thu, Feb 15, 2024 at 6:14 PM Ken Matsui wrote: > > On Thu, Feb 15, 2024 at 1:48 PM Patrick Palka wrote: > > > > On Thu, 15 Feb 2024, Ken Matsui wrote: > > > > > This patch implements built-in trait for std::rank. > > > > > > gcc/cp/ChangeLog: > > > > > > * cp-trait.def: Define __rank. >

Re: [PATCH v5 13/14] c++: Implement __rank built-in trait

2024-02-15 Thread Ken Matsui
On Thu, Feb 15, 2024 at 1:48 PM Patrick Palka wrote: > > On Thu, 15 Feb 2024, Ken Matsui wrote: > > > This patch implements built-in trait for std::rank. > > > > gcc/cp/ChangeLog: > > > > * cp-trait.def: Define __rank. > > * semantics.cc (trait_expr_value): Handle CPTK_RANK. > >

[PATCH v6 13/14] c++: Implement __rank built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::rank. gcc/cp/ChangeLog: * cp-trait.def: Define __rank. * semantics.cc (trait_expr_value): Handle CPTK_RANK. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of

Re: [PATCH] Turn on LRA on all targets

2024-02-15 Thread Paul Koning
> On Feb 15, 2024, at 5:56 PM, Segher Boessenkool > wrote: > > On Thu, Feb 15, 2024 at 07:34:32PM +, Sam James wrote: >> I have now started doing this in PR113932. > > Thank you! > > Segher Presumably this isn't for version 14 since it's in a late stage, right? I have my bits about

Re: Question on -fwrapv and -fwrapv-pointer

2024-02-15 Thread Kees Cook
On Thu, Feb 15, 2024 at 12:32:17AM -0800, Fangrui Song wrote: > On Fri, Sep 15, 2023 at 11:43 AM Kees Cook via Gcc-patches > wrote: > > > > On Fri, Sep 15, 2023 at 05:47:08PM +, Qing Zhao wrote: > > > > > > > > > > On Sep 15, 2023, at 1:26 PM, Richard Biener > > > > wrote: > > > > > > > > >

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-15 Thread Gerald Pfeifer
On Thu, 15 Feb 2024, Florian Weimer wrote: >> Naive questions: Can definitions really be prototypes (in C)? > Yes, I think so: definitions can be declarations, and function > prototypes are declarations. The standard uses the phrase “function > definition that does not include a function

[PATCH] testsuite: Fix vfprintf-chk-1.c with -fhardened

2024-02-15 Thread Sam James
With _FORTIFY_SOURCE >= 2 (enabled by -fhardened), vfprintf-chk-1.c's __vfprintf_chk ends up calling __vprintf_chk rather than vprintf. ``` --- a/fortify.s +++ b/no-fortify.s @@ -8,27 +8,28 @@ [...] __vfprintf_chk: [...] movl$1, should_optimize(%rip) - jmp __vfprintf_chk +

Re: [PATCH] Turn on LRA on all targets

2024-02-15 Thread Segher Boessenkool
On Thu, Feb 15, 2024 at 07:34:32PM +, Sam James wrote: > I have now started doing this in PR113932. Thank you! Segher

Re: [PATCH] Turn on LRA on all targets

2024-02-15 Thread Paul Koning
> On May 15, 2023, at 5:09 PM, Maciej W. Rozycki wrote: > > ... > > I may choose to implement a non-DWARF unwinder instead, as the VAX stack > frame is always fully described by the hardware and there is never ever a > need for debug information to be able to decode any VAX stack frame

[PATCH] c++: wrong looser excep spec for dep noexcept [PR113158]

2024-02-15 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? By the ??? below I mean that maybe_instantiate_noexcept could return a tristate, and then maybe_check_overriding_exception_spec could check if (maybe_instantiate_noexcept ().is_unknown ()) return true; and we don't have to add

[PATCH] c++: wrong looser exception spec with deleted fn

2024-02-15 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? IMHO trivial enough to go ahead now seeing as it doesn't introduce new errors. -- >8 -- I noticed we don't implement the "unless the overriding function is defined as deleted" wording added to [except.spec] via CWG 1351. DR

[PATCH] libgccjit: Add option to allow special characters in function names

2024-02-15 Thread Antoni Boucher
Hi. This patch adds a new option to allow special characters like . and $ in function names. This is useful to allow for mangling using those characters. Thanks for the review. From 89a92e561ca83a622dcc22a6500ca2b17551edb1 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Thu, 15 Feb 2024

Re: [PATCH] c++/modules: relax diagnostic about GMF contents

2024-02-15 Thread Patrick Palka
On Thu, 15 Feb 2024, Jason Merrill wrote: > On 2/15/24 16:10, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > OK for trunk? > > > > -- >8 -- > > > > Issuing a hard error when the GMF doesn't contain preprocessing > > directives is inconvenient for

Re: [PATCH v5 13/14] c++: Implement __rank built-in trait

2024-02-15 Thread Patrick Palka
On Thu, 15 Feb 2024, Ken Matsui wrote: > This patch implements built-in trait for std::rank. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __rank. > * semantics.cc (trait_expr_value): Handle CPTK_RANK. > (finish_trait_expr): Likewise. > > gcc/testsuite/ChangeLog: > >

[COMMITTED] libgomp: Update documentation for indirect calls in target regions

2024-02-15 Thread Kwok Cheung Yeung
Hi, I have committed this patch to the libgomp documentation to reflect that indirect calls in offloaded target regions are now supported in C, C++ and Fortran. KwokFrom b3b3bd250f0a7c22b7d46d3522c8b94c6a35d22a Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 15 Feb 2024 21:22:26

Re: [PATCH] c++: implicit move with throw [PR113853]

2024-02-15 Thread Jason Merrill
On 2/15/24 10:19, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Here we have template auto is_throwable(T t) -> decltype(throw t, true) { ... } where we didn't properly mark 't' as IMPLICIT_RVALUE_P, which caused the wrong overload to have

Re: [PATCH] c++/modules: relax diagnostic about GMF contents

2024-02-15 Thread Jason Merrill
On 2/15/24 16:10, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Issuing a hard error when the GMF doesn't contain preprocessing directives is inconvenient for automated testcase reduction via cvise. This patch relaxes this

Re: [PATCH] c++/modules: stream TREE_UNAVAILABLE and LAMBDA_EXPR_REGEN_INFO

2024-02-15 Thread Jason Merrill
On 2/15/24 16:11, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- gcc/cp/ChangeLog: * module.cc (trees_out::core_bools): Stream TREE_UNAVAILABLE. (trees_in::core_bools): Likewise.

[PATCH] c++/modules: stream TREE_UNAVAILABLE and LAMBDA_EXPR_REGEN_INFO

2024-02-15 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- gcc/cp/ChangeLog: * module.cc (trees_out::core_bools): Stream TREE_UNAVAILABLE. (trees_in::core_bools): Likewise. (trees_out::core_vals): Stream LAMBDA_EXPR_REGEN_INFO.

[PATCH] c++/modules: relax diagnostic about GMF contents

2024-02-15 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Issuing a hard error when the GMF doesn't contain preprocessing directives is inconvenient for automated testcase reduction via cvise. This patch relaxes this diagnostic into a pedwarn. gcc/cp/ChangeLog:

[pushed] analyzer: remove offset_region size overloads [PR111266]

2024-02-15 Thread David Malcolm
PR analyzer/111266 reports a missing -Wanalyzer-out-of-bounds when accessing relative to a concrete byte offset. Root cause is that offset_region::get_{byte,bit}_size_sval were attempting to compute the size that's valid to access, rather than the size of the access attempt. Fixed by removing

[PATCH] bpf: add inline memmove and memcpy expansion

2024-02-15 Thread David Faust
BPF programs are not typically linked, which means we cannot fall back on library calls to implement __builtin_{memmove,memcpy} and should always expand them inline if possible. GCC already successfully expands these builtins inline in many cases, but failed to do so for a few for simple cases

[PATCH] libgccjit: Do not treat warnings as errors

2024-02-15 Thread Antoni Boucher
Hi. This patch makes libgccjit treat warnings as warnings instead of errors in order to continue the compilation when there are warnings. One thing I'm not sure what to do about is that warnings will keep overriding first_error as long as there are no errors. What behavior should we have here?

Re: [PATCH] Turn on LRA on all targets

2024-02-15 Thread Sam James
Sam James writes: > [[PGP Signed Part:Undecided]] > > "Maciej W. Rozycki" writes: > >> On Sun, 23 Apr 2023, Segher Boessenkool wrote: >> >>> > There are extra ICEs in regression testing and code quality is poor; cf. >>> > .

Re: [PATCH] libgccjit: Clear pending_assemble_externals_processed

2024-02-15 Thread David Malcolm
On Thu, 2024-02-15 at 14:14 -0500, Antoni Boucher wrote: > It's OK to merge even though it touches files outside of the jit > directory and we're in stage 4? > Or do we need some kind of approval? I think this patch is sufficiently low-risk that you can go ahead and merge it. Dave > > On Thu,

Re: [PATCH] libgccjit: Clear pending_assemble_externals_processed

2024-02-15 Thread Antoni Boucher
It's OK to merge even though it touches files outside of the jit directory and we're in stage 4? Or do we need some kind of approval? On Thu, 2024-02-15 at 10:35 -0500, David Malcolm wrote: > On Thu, 2024-02-08 at 17:09 -0500, Antoni Boucher wrote: > > Hi. > > This patch fixes the bug 113842. > >

[committed] testsuite: Require lra effective target for pr107385.c

2024-02-15 Thread Jakub Jelinek
Hi! Old reload doesn't support asm goto with output operands. We have lra effective target (though, strangely it returns 0 just for 2 targets out of at least 16 targets with no LRA support), so this patch uses it, similarly how it is done in other asm goto tests with output operands. Tested on

[PATCH 0/2 V2] aarch64: Place target independent and dependent code in one file.

2024-02-15 Thread Ajit Agarwal
Hello Alex/Richard: I have placed target indpendent and target dependent code in aarch64-ldp-fusion for load store fusion. Common infrastructure of load store pair fusion is divided into target independent and target dependent code. Target independent code is the Generic code with pure virtual

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-15 Thread Jonathan Wakely
On Thu, 15 Feb 2024 at 18:38, François Dumont wrote: > > On 15/02/2024 14:17, Jonathan Wakely wrote: > > > > On Wed, 14 Feb 2024 at 21:48, François Dumont > wrote: > >> >> On 14/02/2024 20:44, Jonathan Wakely wrote: >> >> >> >> On Wed, 14 Feb 2024 at 18:39, François Dumont >> wrote: >> >>>

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-15 Thread François Dumont
On 15/02/2024 14:17, Jonathan Wakely wrote: On Wed, 14 Feb 2024 at 21:48, François Dumont wrote: On 14/02/2024 20:44, Jonathan Wakely wrote: On Wed, 14 Feb 2024 at 18:39, François Dumont wrote: libstdc++: [_GLIBCXX_DEBUG] Fix std::__niter_base behavior

[PATCH] c++/modules: optimize tree flag streaming

2024-02-15 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- One would expect consecutive calls to bytes_in/out::b for streaming adjacent bits, as we do for tree flag streaming, to at least be optimized by the compiler into individual bit operations using statically

Re: [PATCH] aarch64, acle header: Cast uint64_t pointers to DIMode.

2024-02-15 Thread Richard Sandiford
Iain Sandoe writes: >> On 5 Feb 2024, at 14:56, Iain Sandoe wrote: >> >> Tested on aarch64-linux,darwin and a cross from aarch64-darwin to linux, >> OK for trunk, or some alternative is needed? > > Hmm.. apparently, this fails the linaro pre-commit CI for g++ with: > error: invalid conversion

Re: [PATCH] aarch64: Fix undefined code in vect_ctz_1.c

2024-02-15 Thread Richard Sandiford
Andrew Pinski writes: > The testcase gcc.target/aarch64/vect_ctz_1.c fails execution when running > with -march=armv9-a due to the testcase calls __builtin_ctz with a value of 0. > The testcase should not depend on undefined behavior of __builtin_ctz. So this > changes it to use the g form with

[PATCH] Fortran: fix passing array component to polymorphic argument [PR105658]

2024-02-15 Thread Peter Hill
Dear all, The attached patch fixes PR105658 by forcing an array temporary to be created. This is required when passing an array component, but this didn't happen if the dummy argument was an unlimited polymorphic type. The problem bit of code is in `gfc_conv_expr_descriptor`, near L7828:

Re: [PATCH 0/1 V2] Target independent code for common infrastructure of load,store fusion for rs6000 and aarch64 target.

2024-02-15 Thread Ajit Agarwal
On 15/02/24 10:43 pm, Alex Coplan wrote: > So IIUC Richard was suggesting splitting into target-independent and > target-dependent pieces within aarch64-ldp-fusion.cc as a first step, > i.e. you introduce the abstractions (virtual functions) needed within > that file. That should hopefully be

Re: [PATCH] testsuite: Define _POSIX_SOURCE for tests [PR113278]

2024-02-15 Thread Torbjorn SVENSSON
On 2024-02-15 18:18, Mike Stump wrote: On Feb 15, 2024, at 9:03 AM, Torbjörn SVENSSON wrote: Ok for trunk? Ok. Pushed as 8e8c2d2b34971bb29e74341a3efc625f1db06639. gcc/testsuite/ChangeLog: PR113278 * c-c++-common/analyzer/fileno-1.c: Define _POSIX_SOURCE. *

Re: [COMMITTED V3 1/4] RISC-V: Add non-vector types to dfa pipelines

2024-02-15 Thread Edwin Lu
On 2/15/2024 1:25 AM, Li, Pan2 wrote: Sorry for late reply due to holiday. I double-checked the calling-convernsion-*.c dump, it is safe to adjust the asm check to the number as you mentioned. Hi Pan, I hope you had a good holiday! I already changed the numbers and added a bit more checks

Re: [PATCH] testsuite: Add support for scanning assembly with comparitor

2024-02-15 Thread Mike Stump
On Feb 12, 2024, at 11:38 AM, Edwin Lu wrote: > > There is currently no support for matching at least x lines of assembly > (only scan-assembler-times). This patch would allow setting upper or lower > bounds. > > Use case: using different scheduler descriptions and/or cost models will > change

Re: [PATCH] tree-optimization/113910 - huge compile time during PTA

2024-02-15 Thread Richard Biener
> Am 15.02.2024 um 18:06 schrieb Richard Sandiford : > > Richard Biener writes: >>> On Wed, 14 Feb 2024, Richard Biener wrote: >>> >>> For the testcase in PR113910 we spend a lot of time in PTA comparing >>> bitmaps for looking up equivalence class members. This points to >>> the very weak

Re: [PATCH] testsuite: Define _POSIX_SOURCE for tests [PR113278]

2024-02-15 Thread Mike Stump
On Feb 15, 2024, at 9:03 AM, Torbjörn SVENSSON wrote: > > Ok for trunk? Ok. > gcc/testsuite/ChangeLog: > PR113278 > * c-c++-common/analyzer/fileno-1.c: Define _POSIX_SOURCE. > * c-c++-common/analyzer/flex-with-call-summaries.c: Same. > *

Re: [PATCH 0/1 V2] Target independent code for common infrastructure of load,store fusion for rs6000 and aarch64 target.

2024-02-15 Thread Alex Coplan
On 15/02/2024 22:38, Ajit Agarwal wrote: > Hello Alex: > > On 15/02/24 10:12 pm, Alex Coplan wrote: > > On 15/02/2024 21:24, Ajit Agarwal wrote: > >> Hello Richard: > >> > >> As per your suggestion I have divided the patch into target independent > >> and target dependent for aarch64 target. I

Re: [PATCH 0/1 V2] Target independent code for common infrastructure of load,store fusion for rs6000 and aarch64 target.

2024-02-15 Thread Ajit Agarwal
Hello Alex: On 15/02/24 10:12 pm, Alex Coplan wrote: > On 15/02/2024 21:24, Ajit Agarwal wrote: >> Hello Richard: >> >> As per your suggestion I have divided the patch into target independent >> and target dependent for aarch64 target. I kept aarch64-ldp-fusion same >> and did not change that. >

Re: [PATCH] tree-optimization/113910 - huge compile time during PTA

2024-02-15 Thread Richard Sandiford
Richard Biener writes: > On Wed, 14 Feb 2024, Richard Biener wrote: > >> For the testcase in PR113910 we spend a lot of time in PTA comparing >> bitmaps for looking up equivalence class members. This points to >> the very weak bitmap_hash function which effectively hashes set >> and a subset of

RE: [PATCH] aarch64: Improve PERM<{0}, a, ...> (64bit) by adding whole vector shift right [PR113872]

2024-02-15 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Tamar Christina > Sent: Thursday, February 15, 2024 8:27 AM > To: Richard Sandiford ; Andrew Pinski (QUIC) > > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] aarch64: Improve PERM<{0}, a, ...> (64bit) by adding > whole vector shift right [PR113872] > > >

[PATCH] testsuite: Define _POSIX_SOURCE for tests [PR113278]

2024-02-15 Thread Torbjörn SVENSSON
Ok for trunk? -- As the tests assume that fileno() is visible (only part of POSIX), define the guard to ensure that it's visible. Currently, glibc appears to always have this defined in C++, newlib does not. Without this patch, fails like this can be seen: Testing analyzer/fileno-1.c,

Re: [PATCH] libgccjit: Add count zeroes builtins to ensure_optimization_builtins_exist

2024-02-15 Thread David Malcolm
On Thu, 2024-02-15 at 11:32 -0500, Antoni Boucher wrote: > Hi. > This patch adds some missing builtins that can be generated by > optimizations. > I'm not sure how to add a test for this one. > Do you know the C code that can be optimized to a builtin_clz? I don't. Given a reproducer we could

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-15 Thread Florian Weimer
* Gerald Pfeifer: > On Fri, 2 Feb 2024, Florian Weimer wrote: >> +Certain warnings are now errors > > That's quite a nice description, thank you, Florian! > >> +The initial ISO C standard and its 1999 revision removed support for > > May I suggest to wrap paragraphs in ...? Not strictly necessary

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-15 Thread Florian Weimer
* Gerald Pfeifer: > On Fri, 2 Feb 2024, Florian Weimer wrote: >> htdocs/gcc-14/porting_to.html | 465 >> ++ >> 1 file changed, 465 insertions(+) >> + >> +Using pointers as integers and vice versa >> (-Werror=int-conversion) > >> +It makes sense to

Re: [PATCH 0/1 V2] Target independent code for common infrastructure of load,store fusion for rs6000 and aarch64 target.

2024-02-15 Thread Alex Coplan
On 15/02/2024 21:24, Ajit Agarwal wrote: > Hello Richard: > > As per your suggestion I have divided the patch into target independent > and target dependent for aarch64 target. I kept aarch64-ldp-fusion same > and did not change that. I'm not sure this was what Richard suggested doing, though.

[PATCH] libgccjit: Add count zeroes builtins to ensure_optimization_builtins_exist

2024-02-15 Thread Antoni Boucher
Hi. This patch adds some missing builtins that can be generated by optimizations. I'm not sure how to add a test for this one. Do you know the C code that can be optimized to a builtin_clz? Thanks for the review. From 578cb40bd333abf57e5b3b08d3453bdcf7ad80b5 Mon Sep 17 00:00:00 2001 From: Antoni

RE: [PATCH] aarch64: Improve PERM<{0}, a, ...> (64bit) by adding whole vector shift right [PR113872]

2024-02-15 Thread Tamar Christina
> -Original Message- > From: Richard Sandiford > Sent: Thursday, February 15, 2024 2:56 PM > To: Andrew Pinski > Cc: gcc-patches@gcc.gnu.org; Tamar Christina > Subject: Re: [PATCH] aarch64: Improve PERM<{0}, a, ...> (64bit) by adding > whole > vector shift right [PR113872] > > Andrew

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-15 Thread Florian Weimer
* Gerald Pfeifer: >> This mostly happens in function definitions >> +that are not prototypes > > Naive questions: Can definitions really be prototypes (in C)? Yes, I think so: definitions can be declarations, and function prototypes are declarations. The standard uses the phrase “function

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-15 Thread Sam James
Florian Weimer writes: > * Sam James: > >> It's fine if you leave this out, but consider mentioning the common >> pitfall of autoconf projects not including config.h consistently before >> all inclues. We could also mention AC_USE_SYSTEM_EXTENSIONS. > > I added: > > “ > Alternatively, projects

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-15 Thread Florian Weimer
* Sam James: > It's fine if you leave this out, but consider mentioning the common > pitfall of autoconf projects not including config.h consistently before > all inclues. We could also mention AC_USE_SYSTEM_EXTENSIONS. I added: “ Alternatively, projects using using Autoconf could enable

Re: [PATCH][GCC 12] aarch64: Avoid out-of-range shrink-wrapped saves [PR111677]

2024-02-15 Thread Alex Coplan
On 14/02/2024 11:18, Richard Sandiford wrote: > Alex Coplan writes: > > This is a backport of the GCC 13 fix for PR111677 to the GCC 12 branch. > > The only part of the patch that isn't a straight cherry-pick is due to > > the TX iterator lacking TDmode for GCC 12, so this version adjusts > >

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-15 Thread Florian Weimer
* Jonathan Wakely: >>+To fix the remaining int-conversions issues, add casts >>+to an appropriate pointer or integer type. On GNU systems, the >>+standard (but generally optional) types > > I know what you mean here, but I'm not sure the parenthesis adds > clarity for anybody who doesn't already

[PATCH 0/1 V2] Target independent code for common infrastructure of load,store fusion for rs6000 and aarch64 target.

2024-02-15 Thread Ajit Agarwal
Hello Richard: As per your suggestion I have divided the patch into target independent and target dependent for aarch64 target. I kept aarch64-ldp-fusion same and did not change that. Common infrastructure of load store pair fusion is divided into target independent and target dependent code for

Re: [PATCH] libgccjit: Fix ira cost segfault

2024-02-15 Thread Antoni Boucher
This patch is indeed not necessary anymore. On Wed, 2024-01-10 at 09:32 -0500, David Malcolm wrote: > On Wed, 2024-01-10 at 09:30 -0500, David Malcolm wrote: > > On Thu, 2023-11-16 at 17:28 -0500, Antoni Boucher wrote: > > > Hi. > > > This patch fixes a segfault that happens when compiling

Re: [PATCH] libgccjit: Clear pending_assemble_externals_processed

2024-02-15 Thread David Malcolm
On Thu, 2024-02-08 at 17:09 -0500, Antoni Boucher wrote: > Hi. > This patch fixes the bug 113842. > I cannot yet add a test with this patch since it requires using > try/catch which is not yet merged in master. > Thanks for the review. Thanks; patch looks good for trunk, assuming you've tested it

[PATCH v5 01/14] c++: Implement __add_pointer built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::add_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __add_pointer. * semantics.cc (finish_trait_type): Handle CPTK_ADD_POINTER. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer.

[PATCH v5 04/14] libstdc++: Optimize std::remove_extent compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_extent by dispatching to the new __remove_extent built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_extent): Use __remove_extent built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v5 12/14] libstdc++: Optimize std::decay compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::decay by dispatching to the new __decay built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (decay): Use __decay built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 6 ++ 1 file

[PATCH v5 09/14] c++: Implement __add_rvalue_reference built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::add_rvalue_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __add_rvalue_reference. * semantics.cc (finish_trait_type): Handle CPTK_ADD_RVALUE_REFERENCE. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[PATCH v5 14/14] libstdc++: Optimize std::rank compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::rank by dispatching to the new __rank built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (rank): Use __rank built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 6 ++ 1 file

[PATCH v5 10/14] libstdc++: Optimize std::add_rvalue_reference compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_rvalue_reference by dispatching to the new __add_rvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_rvalue_reference): Use __add_rvalue_reference built-in trait.

[PATCH v5 05/14] c++: Implement __remove_all_extents built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::remove_all_extents. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_all_extents. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_ALL_EXTENTS. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[PATCH v5 13/14] c++: Implement __rank built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::rank. gcc/cp/ChangeLog: * cp-trait.def: Define __rank. * semantics.cc (trait_expr_value): Handle CPTK_RANK. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of

[PATCH v5 07/14] c++: Implement __add_lvalue_reference built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::add_lvalue_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __add_lvalue_reference. * semantics.cc (finish_trait_type): Handle CPTK_ADD_LVALUE_REFERENCE. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[PATCH v5 02/14] libstdc++: Optimize std::add_pointer compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_pointer by dispatching to the new __add_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_pointer): Use __add_pointer built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v5 06/14] libstdc++: Optimize std::remove_all_extents compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_all_extents by dispatching to the new __remove_all_extents built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_all_extents): Use __remove_all_extents built-in trait. Signed-off-by: Ken Matsui

[PATCH v5 08/14] libstdc++: Optimize std::add_lvalue_reference compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_lvalue_reference by dispatching to the new __add_lvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_lvalue_reference): Use __add_lvalue_reference built-in trait.

[PATCH v5 03/14] c++: Implement __remove_extent built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::remove_extent. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_extent. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_EXTENT. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of

[PATCH v5 11/14] c++: Implement __decay built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::decay. gcc/cp/ChangeLog: * cp-trait.def: Define __decay. * semantics.cc (finish_trait_type): Handle CPTK_DECAY. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __decay. * g++.dg/ext/decay.C:

[PATCH] c++: implicit move with throw [PR113853]

2024-02-15 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Here we have template auto is_throwable(T t) -> decltype(throw t, true) { ... } where we didn't properly mark 't' as IMPLICIT_RVALUE_P, which caused the wrong overload to have been chosen. Jason figured out it's because

[committed] testsuite: Add testcase for already fixed PR [PR107385]

2024-02-15 Thread Jakub Jelinek
Hi! This testcase has been fixed by the PR113921 fix, but unlike testcase in there this one is not target specific. Tested on x86_64-linux -m32/-m64, committed to trunk as obvious. 2024-02-15 Jakub Jelinek PR middle-end/107385 * gcc.dg/pr107385.c: New test. ---

Re: [PATCH] aarch64: Improve PERM<{0}, a, ...> (64bit) by adding whole vector shift right [PR113872]

2024-02-15 Thread Richard Sandiford
Andrew Pinski writes: > The backend currently defines a whole vector shift left for 64bit vectors, > adding the > shift right can also improve code for some PERMs too. So this adds that > pattern. Is this reversed? It looks like we have the shift right and the patch is adding the shift left

Re: [PATCH] expand: Fix handling of asm goto outputs vs. PHI argument adjustments [PR113921]

2024-02-15 Thread Richard Biener
On Thu, 15 Feb 2024, Jakub Jelinek wrote: > Hi! > > The Linux kernel and the following testcase distilled from it is > miscompiled, because tree-outof-ssa.cc (eliminate_phi) emits some > fixups on some of the edges (but doesn't commit edge insertions). > Later expand_asm_stmt emits further

[PATCH] tree-optimization/111156 - properly dissolve SLP only groups

2024-02-15 Thread Richard Biener
The following fixes the omission of failing to look at pattern stmts when we need to dissolve SLP only groups. Bootstrapped and tested on x86-64-unknown-linux-gnu, pushed. PR tree-optimization/56 * tree-vect-loop.cc (vect_dissolve_slp_only_groups): Look at the pattern

Re: [PATCH][GCC][Arm] Missing optimization pattern for rev16 on architectures with thumb1

2024-02-15 Thread Richard Earnshaw (lists)
On 12/02/2024 13:48, Matthieu Longo wrote: > This patch marks a rev16 test as XFAIL for architectures having only Thumb1 > support. The generated code is functionally correct, but the optimization is > disabled when -mthumb is equivalent to Thumb1. Fixing the root issue would > requires changes

Re: [PATCH] libgccjit: Clear pending_assemble_externals_processed

2024-02-15 Thread Antoni Boucher
David: Ping. On Thu, 2024-02-08 at 17:09 -0500, Antoni Boucher wrote: > Hi. > This patch fixes the bug 113842. > I cannot yet add a test with this patch since it requires using > try/catch which is not yet merged in master. > Thanks for the review.

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-02-15 Thread Antoni Boucher
David: Ping On Thu, 2024-02-08 at 08:59 -0500, Antoni Boucher wrote: > David: Ping. > > On Wed, 2024-01-10 at 18:58 -0500, Antoni Boucher wrote: > > Here it is: https://gcc.gnu.org/pipermail/jit/2023q4/001725.html > > > > On Wed, 2024-01-10 at 18:44 -0500, David Malcolm wrote: > > > On Wed,

[PATCH] c-c++-common/Wrestrict.c: fix some typos and enable for LLP64

2024-02-15 Thread Jonathan Yong
Attached patch OK? Copy/pasted for review convenience. diff --git a/gcc/testsuite/c-c++-common/Wrestrict.c b/gcc/testsuite/c-c++-common/Wrestrict.c index 4d005a618b3..57a3f67e21e 100644 --- a/gcc/testsuite/c-c++-common/Wrestrict.c +++ b/gcc/testsuite/c-c++-common/Wrestrict.c @@ -381,14 +381,14

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::__niter_base behavior

2024-02-15 Thread Jonathan Wakely
On Wed, 14 Feb 2024 at 21:48, François Dumont wrote: > > On 14/02/2024 20:44, Jonathan Wakely wrote: > > > > On Wed, 14 Feb 2024 at 18:39, François Dumont > wrote: > >> libstdc++: [_GLIBCXX_DEBUG] Fix std::__niter_base behavior >> >> std::__niter_base is used in _GLIBCXX_DEBUG mode to remove >>

Re: GCN RDNA2+ vs. GCC vectorizer "Reduce using vector shifts"

2024-02-15 Thread Andrew Stubbs
On 15/02/2024 10:23, Thomas Schwinge wrote: Hi! On 2024-02-15T08:49:17+0100, Richard Biener wrote: On Wed, 14 Feb 2024, Andrew Stubbs wrote: On 14/02/2024 13:43, Richard Biener wrote: On Wed, 14 Feb 2024, Andrew Stubbs wrote: On 14/02/2024 13:27, Richard Biener wrote: On Wed, 14 Feb 2024,

[PATCH v4 06/12] libstdc++: Optimize std::remove_all_extents compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_all_extents by dispatching to the new __remove_all_extents built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_all_extents): Use __remove_all_extents built-in trait. Signed-off-by: Ken Matsui

[PATCH v4 12/12] libstdc++: Optimize std::decay compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::decay by dispatching to the new __decay built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (decay): Use __decay built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 6 ++ 1 file

[PATCH v4 07/12] c++: Implement __add_lvalue_reference built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::add_lvalue_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __add_lvalue_reference. * semantics.cc (finish_trait_type): Handle CPTK_ADD_LVALUE_REFERENCE. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[PATCH v4 09/12] c++: Implement __add_rvalue_reference built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::add_rvalue_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __add_rvalue_reference. * semantics.cc (finish_trait_type): Handle CPTK_ADD_RVALUE_REFERENCE. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[patch,avr,applied] Fix PR target/113927: Simple code triggers a stack frame

2024-02-15 Thread Georg-Johann Lay
Applied this patch Johann -- AVR: target 113927 - Simple code triggers stack frame for Reduced Tiny. The -mmcu=avrtiny cores have no ADIW and SBIW instructions. This was implemented by clearing all regs out of regclass ADDW_REGS so that constraint "w" never matched. This corrupted the

[PATCH v4 11/12] c++: Implement __decay built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::decay. gcc/cp/ChangeLog: * cp-trait.def: Define __decay. * semantics.cc (finish_trait_type): Handle CPTK_DECAY. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __decay. * g++.dg/ext/decay.C:

[PATCH v4 08/12] libstdc++: Optimize std::add_lvalue_reference compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_lvalue_reference by dispatching to the new __add_lvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_lvalue_reference): Use __add_lvalue_reference built-in trait.

[PATCH v4 05/12] c++: Implement __remove_all_extents built-in trait

2024-02-15 Thread Ken Matsui
This patch implements built-in trait for std::remove_all_extents. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_all_extents. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_ALL_EXTENTS. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[PATCH v4 10/12] libstdc++: Optimize std::add_rvalue_reference compilation performance

2024-02-15 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_rvalue_reference by dispatching to the new __add_rvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_rvalue_reference): Use __add_rvalue_reference built-in trait.

Re: [PATCH] bpf: fix zero_extendqidi2 ldx template

2024-02-15 Thread Jose E. Marchesi
Hi Faust. OK, thank you. > Commit 77d0f9ec3809b4d2e32c36069b6b9239d301c030 inadvertently changed > the normal asm dialect instruction template for zero_extendqidi2 from > ldxb to ldxh. Fix that. > > Tested for bpf-unknown-none on x86_64-linux-gnu host. > > gcc/ > > * config/bpf/bpf.md

Re: GCN RDNA2+ vs. GCC vectorizer "Reduce using vector shifts"

2024-02-15 Thread Richard Biener
On Thu, 15 Feb 2024, Andrew Stubbs wrote: > On 15/02/2024 10:21, Richard Biener wrote: > [snip] > >>> I suppse if RDNA really only has 32 lane vectors (it sounds like it, > >>> even if it can "simulate" 64 lane ones?) then it might make sense to > >>> vectorize for 32 lanes? That said, with

Re: [PATCH] gccrs: Avoid *.bak suffixed tests - use dg-skip-if instead

2024-02-15 Thread Arthur Cohen
Hi Jakub, On 2/15/24 10:10, Jakub Jelinek wrote: On Fri, Feb 09, 2024 at 11:03:38AM +0100, Jakub Jelinek wrote: On Wed, Feb 07, 2024 at 12:43:59PM +0100, arthur.co...@embecosm.com wrote: From: Philip Herron This patch introduces one regression because generics are getting better understood

[committed] libstdc++: Use memset to optimize std::bitset::set() [PR113807]

2024-02-15 Thread Jonathan Wakely
Tested aarch64-linux and x86_64-linux. Pushed to trunk. -- >8 -- As pointed out in the PR we already do this for reset(). libstdc++-v3/ChangeLog: PR libstdc++/113807 * include/std/bitset (bitset::set()): Use memset instead of a loop over the individual words. ---

  1   2   >