Re: 'gcc/config/nvptx/gen-multilib-matches.sh': Support '--selftest' (was: 'gcc/config/nvptx/t-nvptx': Don't use the 'shell' function of 'make' (was: nvptx: Allow '--with-arch' to override the default

2024-12-06 Thread Sam James
Hi! The script has #!/bin/sh shebang (and hence must have POSIX shell compatibility), but the patch introduces uses of the 'local' keyword which isn't in POSIX. While many shells do have the 'local' keyword, its behaviour isn't portable across those either, which is why it's likely it'll never be

Re: 'gcc/config/nvptx/gen-multilib-matches.sh': Support '--selftest' (was: 'gcc/config/nvptx/t-nvptx': Don't use the 'shell' function of 'make' (was: nvptx: Allow '--with-arch' to override the default

2024-12-06 Thread Thomas Schwinge
Hi Sam! On 2024-12-06T09:34:32+, Sam James wrote: > The script has #!/bin/sh shebang (and hence must have POSIX shell > compatibility), but the patch introduces uses of the 'local' keyword > which isn't in POSIX. > > While many shells do have the 'local' keyword, its behaviour isn't > portabl

[PATCH] arm, testsuite: Add -mtune=cortex-m55 to dlstp-compile-asm-1.c test.

2024-12-06 Thread Christophe Lyon
This test would fail if GCC is configured with non-default options, such as -mtune=cortex-a9. This 'unexpected' scheduling makes the DLSTP optimization generate subslr, #16 bhi .L4 lctp pop {r4, r5, pc} .L4: sub ip, ip, #16 b i

Re: [PATCH] arm, testsuite: Add -mtune=cortex-m55 to dlstp-compile-asm-1.c test.

2024-12-06 Thread Richard Earnshaw (lists)
On 06/12/2024 10:02, Christophe Lyon wrote: > This test would fail if GCC is configured with non-default options, > such as -mtune=cortex-a9. > > This 'unexpected' scheduling makes the DLSTP optimization generate > subslr, #16 > bhi .L4 > lctp > pop {r4, r5, pc}

Re: [PATCH] config: nvptx: fix bashisms with gen-copyright.sh use

2024-12-06 Thread Thomas Schwinge
Hi Sam and Tom! On 2024-12-06T09:13:40+, Sam James wrote: > Providing parameters to `.` when sourcing is a bashism and not supported > by POSIX shell which causes a build failure when compiling a toolchain > for nvptx-none with dash as /bin/sh. Hmm, something must be wrong in that statement,

nvptx: Enhance '-march=[...]' test cases (was: [committed][nvptx, testsuite] Add gcc.target/nvptx/sm*.c)

2024-12-06 Thread Thomas Schwinge
Hi! On 2022-03-01T09:00:45+0100, Tom de Vries via Gcc-patches wrote: > Add a few test-cases that test passing each -misa=sm_xx version and verify > that > the proper __PTX_SM__ is defined. Pushed to trunk branch commit ed96ce81b19b76ba6a5edfe68dd86d8ea319c6d9 "nvptx: Enhance '-march=[...]' tes

nvptx: Enhance '-march-map=[...]' test cases (was: [committed][nvptx] Add march-map)

2024-12-06 Thread Thomas Schwinge
Hi! On 2022-03-29T14:03:22+0200, Tom de Vries via Gcc-patches wrote: > [...] > > gcc/testsuite/ChangeLog: > > 2022-03-29 Tom de Vries > > PR target/104714 > * gcc.target/nvptx/march-map.c: New test. Pushed to trunk branch commit ee6711ead30876daf2a8a66f8647cad95470fe79 "nvptx: En

Re: [PATCH] config: nvptx: fix bashisms with gen-copyright.sh use

2024-12-06 Thread Sam James
Thomas Schwinge writes: > Hi Sam and Tom! Hi! > > On 2024-12-06T09:13:40+, Sam James wrote: >> Providing parameters to `.` when sourcing is a bashism and not supported >> by POSIX shell which causes a build failure when compiling a toolchain >> for nvptx-none with dash as /bin/sh. > > Hmm,

nvptx: Enhance '-mptx=[...]' test cases (was: [committed][nvptx] Add __PTX_ISA_VERSION_{MAJOR,MINOR}__)

2024-12-06 Thread Thomas Schwinge
Hi! On 2022-03-29T16:17:43+0200, Tom de Vries via Gcc-patches wrote: > [...] > > gcc/testsuite/ChangeLog: > > 2022-03-29 Tom de Vries > > PR target/104857 > * gcc.target/nvptx/ptx31.c: New test. > * gcc.target/nvptx/ptx60.c: New test. > * gcc.target/nvptx/ptx63.c: New

[patch,avr] Disable CRC lookup tables

2024-12-06 Thread Georg-Johann Lay
This patch disables CRC lookup tables which consume quite some RAM. Ok for trunk? Johann -- AVR: Disable generation of CRC lookup tables. With -foptimize-crc, large lookup tables may be generated which are places in .rodata (RAM). This patch disables such tables. gcc/ * common/confi

Re: [PATCH v3] arm: [MVE intrinsics] Fix support for predicate constants [PR target/114801]

2024-12-06 Thread Richard Earnshaw (lists)
On 04/12/2024 20:56, Christophe Lyon wrote: > On Wed, 4 Dec 2024 at 12:39, Richard Earnshaw (lists) > wrote: >> >> On 25/11/2024 20:08, Christophe Lyon wrote: >>> In this PR, we have to handle a case where MVE predicates are supplied >>> as a const_int, where individual predicates have illegal boo

[PUSHED] nvptx: Support '-march=sm_37'

2024-12-06 Thread Thomas Schwinge
gcc/ * config/nvptx/nvptx-sm.def: Add '37'. * config/nvptx/nvptx-gen.h: Regenerate. * config/nvptx/nvptx-gen.opt: Likewise. * config/nvptx/nvptx.cc (first_ptx_version_supporting_sm): Adjust. * config/nvptx/nvptx.opt (-march-map=sm_37, -march-map=sm_50

[PUSHED] nvptx: Support '-mptx=4.1'

2024-12-06 Thread Thomas Schwinge
gcc/ * config/nvptx/nvptx-opts.h (enum ptx_version): Add 'PTX_VERSION_4_1'. * config/nvptx/nvptx.cc (ptx_version_to_string) (ptx_version_to_number): Adjust. * config/nvptx/nvptx.h (TARGET_PTX_4_1): New. * config/nvptx/nvptx.opt (Enum(ptx_versi

[PUSHED] nvptx: Support '-mptx=7.8'

2024-12-06 Thread Thomas Schwinge
gcc/ * config/nvptx/nvptx-opts.h (enum ptx_version): Add 'PTX_VERSION_7_8'. * config/nvptx/nvptx.cc (ptx_version_to_string) (ptx_version_to_number): Adjust. * config/nvptx/nvptx.h (TARGET_PTX_7_8): New. * config/nvptx/nvptx.opt (Enum(ptx_versi

[PUSHED] nvptx: Support '-march=sm_89'

2024-12-06 Thread Thomas Schwinge
gcc/ * config/nvptx/nvptx-sm.def: Add '89'. * config/nvptx/nvptx-gen.h: Regenerate. * config/nvptx/nvptx-gen.opt: Likewise. * config/nvptx/nvptx.cc (first_ptx_version_supporting_sm): Adjust. * config/nvptx/nvptx.opt (-march-map=sm_89, -march-map=sm_90

Re: [PATCH] avoid-store-forwarding: Reject changes when an instruction may throw [PR117816]

2024-12-06 Thread Philipp Tomsich
Applied to master. Thanks! --Philipp. On Fri, 6 Dec 2024 at 06:03, Jeff Law wrote: > > > > On 12/5/24 6:18 AM, Konstantinos Eleftheriou wrote: > > From: kelefth > > > > Avoid-store-forwarding doesn't handle the case where an instruction in the > > store-load sequence contains a REG_EH_REGION no

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-06 Thread swamy sangamesh
Dear Community, Please let me know if the attached patch is fine. Thanks, Sangamesh On Tue, Dec 3, 2024 at 11:19 PM swamy sangamesh wrote: > Hi Eric, > > Thanks for the review. > > I too think removing the define is a better approach and seems these won't > be needed. > From the comment it loo

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-06 Thread Sam James
swamy sangamesh writes: > Dear Community, > > Please let me know if the attached patch is fine. For such patches, I recommend CCing the maintainers of relevant components. In this case, that's David Edelsohn, being the AIX maintainer (done it for you here). I can't approve it but I imagine the

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Sam James
Georg-Johann Lay writes: > This patch disables CRC lookup tables which consume quite some RAM. Given that -foptimize-crc is new, it may be useful to CC the pass authors in case they have input. > > Ok for trunk? > > Johann

[PUSHED] nvptx: Support '-march=sm_52'

2024-12-06 Thread Thomas Schwinge
gcc/ * config/nvptx/nvptx-sm.def: Add '52'. * config/nvptx/nvptx-gen.h: Regenerate. * config/nvptx/nvptx-gen.opt: Likewise. * config/nvptx/nvptx.cc (first_ptx_version_supporting_sm): Adjust. * config/nvptx/nvptx.opt (-march-map=sm_52): Likewise.

Re: [patch,lra] PR116778 we need a full live range info after rematerialization

2024-12-06 Thread Sam James
Denis Chertykov writes: > The fix for PR116778: > Added Vlad to CC. > [...] > > diff --git a/gcc/lra-lives.cc b/gcc/lra-lives.cc > index 49134ade713..510f7d927ab 100644 > --- a/gcc/lra-lives.cc > +++ b/gcc/lra-lives.cc > @@ -62,9 +62,10 @@ int lra_hard_reg_usage[FIRST_PSEUDO_REGISTER]; > /* A

Re: [PATCH] Fix incorrect line numbers in large files bug#108900

2024-12-06 Thread Sam James
Jeremy Bettis writes: > Patch to fix known bug from > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108900 > > diff -ur gcc-clean/gcc-14.2.0/libcpp/files.cc gcc-14.2.0/libcpp/files.cc > --- gcc-clean/gcc-14.2.0/libcpp/files.cc 2024-08-01 08:17:17.0 + > +++ gcc-14.2.0/libcpp/files.cc 20

Re: [PATCH v6 1/7] Honor TARGET_PROMOTE_PROTOTYPES during RTL expand

2024-12-06 Thread Richard Biener
On Wed, Dec 4, 2024 at 9:48 PM H.J. Lu wrote: > > Promote integer arguments smaller than int if TARGET_PROMOTE_PROTOTYPES > returns true. This is OK when 2/7 got no negative comments and Jeff doesn't have further input here. (I think 1/7+2/7 are a good improvement on their own given the latent b

Re: [PATCH 3/3] dwarf: lto: Stabilize external die references.

2024-12-06 Thread Michal Jireš
On 11/27/24 3:12 PM, Richard Biener wrote: I wonder why you could not always do this for a subset of symbols, namely those exported from the current TU and building a symbol based on the symbols assembler name? That is, I dislike relying on a new flag_lto_debuginfo_assume_unique_filepaths fla

Re: [PATCH v6 2/7] Drop targetm.promote_prototypes from C, C++ and Ada frontends

2024-12-06 Thread Richard Biener
On Wed, Dec 4, 2024 at 9:48 PM H.J. Lu wrote: > > Remove the targetm.calls.promote_prototypes call from C, C++ and Ada > frontends. I'm conditionally approving this unless FE maintainers complain before holidays (the effect of the hook is re-instantiated during RTL expansion in 1/7). I've added

Re: [PATCH v6 2/7] Drop targetm.promote_prototypes from C, C++ and Ada frontends

2024-12-06 Thread Eric Botcazou
> I'm conditionally approving this unless FE maintainers complain before > holidays (the effect of the hook is re-instantiated during RTL expansion in > 1/7). FWIW I'm all for removing this piece of code from FEs. -- Eric Botcazou

'gcc/config/nvptx/gen-multilib-matches.sh': Support '--selftest' (was: 'gcc/config/nvptx/t-nvptx': Don't use the 'shell' function of 'make' (was: nvptx: Allow '--with-arch' to override the default '-m

2024-12-06 Thread Thomas Schwinge
Hi! On 2024-12-06T10:01:22+0100, I wrote: > I recently learned that the exit status of the command invoked in a > 'Makefile' via '$(shell [...])' effectively gets discarded (unless > explicitly checking the GNU Make 4.2+ '.SHELLSTATUS' variable or jumping > through other hoops). I was under the a

Re: [PATCH v3] RISC-V: Add --with-cmodel configure option

2024-12-06 Thread Kito Cheng
committee to trunk On Thu, Dec 5, 2024 at 2:59 PM Kito Cheng wrote: > > From: Hau Hsu > > Sometimes we want to use default cmodel other than medlow. Add a GCC > configure option for that. > > gcc/ChangeLog: > > * config.gcc (riscv*-*-*): Add support for --with-cmodel configure > option.

[PATCH] Use new RAW_DATA_{U,S}CHAR_ELT macros in the middle-end and C FE

2024-12-06 Thread Jakub Jelinek
Hi! During the patch review of the C++ #embed optimization, Jason asked for a macro for the common ((const unsigned char *) RAW_DATA_POINTER (value))[i] and ditto with signed char patterns which appear in a lot of places. In the just committed patch I've added +#define RAW_DATA_UCHAR_ELT(NODE, I)

nvptx: Clarify that our baseline is PTX ISA Version 3.1 (was: [committed][nvptx] Choose -mptx default based on -misa)

2024-12-06 Thread Thomas Schwinge
Hi! On 2022-02-08T13:57:53+0100, Tom de Vries via Gcc-patches wrote: > --- a/gcc/config/nvptx/nvptx-opts.h > +++ b/gcc/config/nvptx/nvptx-opts.h > @@ -31,7 +31,9 @@ enum ptx_isa > > enum ptx_version > { > + PTX_VERSION_3_0, >PTX_VERSION_3_1, > + PTX_VERSION_4_2, >PTX_VERSION_6_0, >

nvptx: Support '--with-multilib-list' (was: Raise nvptx code generation to default PTX ISA 7.3, sm_52, therefore CUDA 11.3 (released 2021-04))

2024-12-06 Thread Thomas Schwinge
Hi! On 2024-09-24T18:09:48+0200, I wrote: > [...] build sm_30 multilib variants (either > (3a) by default or (3b) upon 'configure'-time request via an additional > option: '--with-multilib-list=default,sm_30' or similar), and the user > builds with '-foffload-options=nvptx-none=-march=sm_30': [...

nvptx: Expose '-mptx=4.2' (was: [committed][nvptx] Choose -mptx default based on -misa)

2024-12-06 Thread Thomas Schwinge
Hi! On 2022-02-08T14:56:40+0100, Tom de Vries via Gcc-patches wrote: > On 2/8/22 14:24, Tobias Burnus wrote: >> if I understand the patch correctly, -misa=sm_53 -mptx=3.1 will ... > $ ./gcc.sh ~/hello.c -misa=sm_53 -mptx=3.1 > cc1: error: PTX version (-mptx) needs to be at least 4.2 to support

'gcc/config/nvptx/gen-multilib-matches.sh': Encapsulate main logic (was: nvptx: Allow '--with-arch' to override the default '-misa' (was: nvptx multilib setup))

2024-12-06 Thread Thomas Schwinge
Hi! On 2022-06-15T23:18:10+0200, I wrote: > --- /dev/null > +++ b/gcc/config/nvptx/gen-multilib-matches.sh > @@ -0,0 +1,60 @@ > +[...] Pushed to trunk branch commit b352f89d81bb30dbeb406ff7e4d148e2fb640975 "'gcc/config/nvptx/gen-multilib-matches.sh': Encapsulate main logic", see attached. Grüße

[PATCH] config: nvptx: fix bashisms with gen-copyright.sh use

2024-12-06 Thread Sam James
Providing parameters to `.` when sourcing is a bashism and not supported by POSIX shell which causes a build failure when compiling a toolchain for nvptx-none with dash as /bin/sh. gen-copyright.sh takes a parameter for the format of copyright notice required. Switch that to using an environment v

Re: [PATCH] Fix inaccuracy in cunroll/cunrolli when considering what's innermost loop.

2024-12-06 Thread Richard Biener
On Thu, 5 Dec 2024, liuhongt wrote: > r15-919-gef27b91b62c3aa removed 1 / 3 size reduction for innermost > loop, but it doesn't accurately remember what's "innermost" for 2 > testcases in PR117888. > > 1) For pass_cunroll, the "innermost" loop could be an originally outer > loop with inner loop c

[PUSHED] 'gcc/config/nvptx/gen-*.sh': Simplify interface

2024-12-06 Thread Thomas Schwinge
What we currently pass in as '$1' is simply 'dirname "$0"'. gcc/ * config/nvptx/gen-h.sh: Don't pass in '$1'; compute it locally. * config/nvptx/gen-multilib-matches.sh: Likewise. * config/nvptx/gen-omp-device-properties.sh: Likewise. * config/nvptx/gen-opt.

Re: [PATCH] Use new RAW_DATA_{U,S}CHAR_ELT macros in the middle-end and C FE

2024-12-06 Thread Richard Biener
On Fri, 6 Dec 2024, Jakub Jelinek wrote: > Hi! > > During the patch review of the C++ #embed optimization, Jason asked for > a macro for the common > ((const unsigned char *) RAW_DATA_POINTER (value))[i] > and ditto with signed char patterns which appear in a lot of places. > In the just committe

[PATCH] testsuite/117714 - gcc.dg/vect/slp-reduc-4.c FAILs on 32-bit SPARC

2024-12-06 Thread Richard Biener
The testcase tries to ensure we can elide all permutations when vectorizing a MAX reduction. For SPARC the issue is that the MAX reduction isn't supported and since we're trying to fall back to single-lane SLP the dumps contain VEC_PERM_EXPR for the interleaving permute lowering. Before all-SLP t

[PUSHED] nvptx: Tag '-misa=[...]', '-mptx=[...]' as 'Negative' of themselves [PR117916]

2024-12-06 Thread Thomas Schwinge
This issue is similar to what a year ago I resolved for GCN in PR112669 "GCN: wrong 'LIBRARY_PATH' in presence of several different '-march=[...]' flags". Given the current standard nvptx configuration, we get: $ build-gcc-offload-nvptx-none/gcc/xgcc -print-multi-directory -mptx=6.3 .

'gcc/config/nvptx/t-nvptx': Don't use the 'shell' function of 'make' (was: nvptx: Allow '--with-arch' to override the default '-misa' (was: nvptx multilib setup))

2024-12-06 Thread Thomas Schwinge
Hi! I recently learned that the exit status of the command invoked in a 'Makefile' via '$(shell [...])' effectively gets discarded (unless explicitly checking the GNU Make 4.2+ '.SHELLSTATUS' variable or jumping through other hoops). I was under the assumption that an error in a 'shell' function

Re: 'gcc/config/nvptx/gen-multilib-matches.sh': Support '--selftest'

2024-12-06 Thread Sam James
Sam James writes: > Hi! > > The script has #!/bin/sh shebang (and hence must have POSIX shell > compatibility), but the patch introduces uses of the 'local' keyword > which isn't in POSIX. > > While many shells do have the 'local' keyword, its behaviour isn't > portable across those either, which

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Georg-Johann Lay
Am 06.12.24 um 13:23 schrieb Sam James: Georg-Johann Lay writes: This patch disables CRC lookup tables which consume quite some RAM. Given that -foptimize-crc is new, it may be useful to CC the pass authors in case they have input. CCing Mariam Arutunian Ok for trunk? Johann The probl

Re: [PATCH] Fix incorrect line numbers in large files bug#108900

2024-12-06 Thread Lewis Hyatt
On Fri, Dec 6, 2024 at 7:27 AM Sam James wrote: > > Jeremy Bettis writes: > > > Patch to fix known bug from > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108900 > > > > diff -ur gcc-clean/gcc-14.2.0/libcpp/files.cc gcc-14.2.0/libcpp/files.cc > > --- gcc-clean/gcc-14.2.0/libcpp/files.cc 2024-08

[PATCH] RISC-V: optimization on checking certain bits set ((x & mask) == val)

2024-12-06 Thread Oliver Kozul
The patch optimizes code generation for comparisons of the form X & C1 == C2 by converting them to (X | ~C1) == (C2 | ~C1). C1 is a constant that requires li and addi to be loaded, while ~C1 requires a single lui instruction. 2024-12-06 Oliver Kozul   PR target/114087 gcc/ChangeLog:

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Jeff Law
On 12/6/24 5:23 AM, Sam James wrote: Georg-Johann Lay writes: This patch disables CRC lookup tables which consume quite some RAM. Given that -foptimize-crc is new, it may be useful to CC the pass authors in case they have input. I think this is trivially OK for the AVR. The bigger questi

[PATCH 1/2] Refactor final_value_replacement_loop [PR90594]

2024-12-06 Thread Feng Xue OS
This patch refactors the procedure in tree-scalar-evolution.cc in order to partially export its functionality to other module, so decomposes it to several relatively independent utility functions. Thanks, Feng --- gcc/ PR tree-optimization/90594 * tree-scalar-evolution.cc (simple

Re: GCN: Fix 'real_from_integer' usage (was: [committed, amdgcn] Zero-initialise masked load destinations)

2024-12-06 Thread Thomas Schwinge
Hi Andrew! On 2024-12-05T15:14:45+0100, I wrote: > On 2020-01-31T11:20:14+, Andrew Stubbs wrote: >> This is one of those things I don't know why we didn't notice sooner. > > ..., and here's another thing I don't know why we didn't notice sooner. > ;-P (Category: "don't we all love C++?!") >

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Sam James
Georg-Johann Lay writes: > Am 06.12.24 um 13:23 schrieb Sam James: >> Georg-Johann Lay writes: >> >>> This patch disables CRC lookup tables which consume quite some RAM. >> Given that -foptimize-crc is new, it may be useful to CC the pass >> authors in case they have input. > > CCing Mariam Aru

Re: [PATCH 2/2] Integrate scev-cprop into DCE [PR90594]

2024-12-06 Thread Feng Xue OS
Forgotten attaching the patch file. From: Feng Xue OS Sent: Friday, December 6, 2024 9:57 PM To: gcc-patches@gcc.gnu.org; Richard Biener Subject: [PATCH 2/2] Integrate scev-cprop into DCE [PR90594] Currently, if could, scev-cprop unconditionally replaces

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Richard Biener
On Fri, Dec 6, 2024 at 2:17 PM Georg-Johann Lay wrote: > > Am 06.12.24 um 13:23 schrieb Sam James: > > Georg-Johann Lay writes: > > > >> This patch disables CRC lookup tables which consume quite some RAM. > > > > Given that -foptimize-crc is new, it may be useful to CC the pass > > authors in cas

[PATCH 2/2] Integrate scev-cprop into DCE [PR90594]

2024-12-06 Thread Feng Xue OS
Currently, if could, scev-cprop unconditionally replaces loop closed ssa with an expression built from loop initial value and loop niter, which might cause redundant code-gen when all interior computations related to IV inside loop are also neccessary. As example, for the below case: p = init_

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-12-06 Thread Qing Zhao
> On Dec 5, 2024, at 17:31, Martin Uecker wrote: > > Am Donnerstag, dem 05.12.2024 um 21:09 + schrieb Qing Zhao: >> >>> On Dec 3, 2024, at 10:29, Qing Zhao wrote: > > > >> It would be clearer if you the syntax ".n" which resembles the syntax f

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Georg-Johann Lay
Am 06.12.24 um 14:53 schrieb Richard Biener: On Fri, Dec 6, 2024 at 2:17 PM Georg-Johann Lay wrote: Am 06.12.24 um 13:23 schrieb Sam James: Georg-Johann Lay writes: This patch disables CRC lookup tables which consume quite some RAM. Given that -foptimize-crc is new, it may be useful to C

Ping [PATCH v3 0/3] Match: support additional cases of unsigned scalar arithmetic

2024-12-06 Thread Akram Ahmad
Ping On 27/11/2024 20:27, Akram Ahmad wrote: Hi all, This patch series adds support for 2 new cases of unsigned scalar saturating arithmetic (one addition, one subtraction). This results in more valid patterns being recognised, which results in a call to .SAT_ADD or .SAT_SUB where relevant.

Re: [PATCH 1/3] tree-optimization/117467 - Do not calculate an entry range for invariant names.

2024-12-06 Thread Andrew MacLeod
I apologize, I could have sworn I checked in this patch set... but I see I did not. re-bootstrapped and regression tested...  and committed now!  you can now invoke the range_query in your patches to check if something is non-zero. Andrew On 11/28/24 12:44, Jakub Jelinek wrote: On Mon, Nov

Re: [PATCH] expr: Don't clear whole unions [PR116416]

2024-12-06 Thread Marek Polacek
On Mon, Oct 14, 2024 at 03:57:45PM -0400, Jason Merrill wrote: > OK. The patch was approved, but even after the r15-5746 + r15-5747 changes, pr78687.C still FAILs: . Perhaps we should XFAIL the test for now then. No other changes besides th

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-06 Thread David Edelsohn
On Fri, Dec 6, 2024 at 2:17 PM Ian Lance Taylor wrote: > David Edelsohn writes: > > > On Fri, Dec 6, 2024 at 12:25 PM Rainer Orth > > > wrote: > > > >> Hi David, > >> > >> > No objection from me, but Ian is the maintainer of libiberty, so I'll > >> defer > >> > to him, especially about style an

[pushed][PR117248][LRA]: Rewriting reg notes update and fix calculation of conflict hard regs of pseudo.

2024-12-06 Thread Vladimir Makarov
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117248 I tested the patch extensively on x86-64, aarch64, ppc64le as the patch contains big changes in live analysis and reg notes update.  I hope it will not result in new PRs. commit 75e7d1600f47859df40b2ac0feff5a71e0d

Re: [PATCHv2] Invalid gimple __BB# accepted due to usage of atoi -> replace atoi with stroul in c_parser_gimple_parse_bb_spec [PR114541]

2024-12-06 Thread Heiko Eißfeldt
2nd try, 1. replaces atoi() with strtoul() with ERANGE checking (as before) 2. fixes the handling of misparsed 'bb_spec's in c_parser_gimple_if_stmt to return early. 3. adds a new test case. I hope I am wright with the assumption that in c_parser_gimple_if_stmt (cfun->curr_properties & PROP_cfg

Re: [PATCH] Invalid gimple __BB# accepted due to usage of atoi -> replace atoi with stroul in c_parser_gimple_parse_bb_spec [PR114541]

2024-12-06 Thread Heiko Eißfeldt
and here is the forgotten patch (it is late...) diff --git a/gcc/c/gimple-parser.cc b/gcc/c/gimple-parser.cc index 78e85d93487..b018bb6afb6 100644 --- a/gcc/c/gimple-parser.cc +++ b/gcc/c/gimple-parser.cc @@ -133,11 +133,21 @@ c_parser_gimple_parse_bb_spec (tree val, int *index) { if (!startsw

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Oleg Endo
On Fri, 2024-12-06 at 16:51 +0100, Georg-Johann Lay wrote: > > The CRC tables ARE put into .rodata, not into .data. > > The correct question is: Why is avr putting .rodata into RAM? > > Suppose the following C code: > > char read_c (const char *p) > { > return p[1]; > } > > Where p may

Re: [committed] RISC-V: Add const to function_shape::get_name [NFC]

2024-12-06 Thread Kito Cheng
Thanks for notifying me that, I just reverted that first and will investigate next week :) On Sat, Dec 7, 2024 at 3:30 AM Mark Wielaard wrote: > > Hi Kito, > > On Thu, Dec 05, 2024 at 03:12:03PM +0800, Kito Cheng wrote: > > function_shape::get_name is the funciton for building intrinsic function

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Georg-Johann Lay
Am 06.12.24 um 15:50 schrieb Oleg Endo: On Fri, 2024-12-06 at 06:32 -0700, Jeff Law wrote: On 12/6/24 5:23 AM, Sam James wrote: Georg-Johann Lay writes: This patch disables CRC lookup tables which consume quite some RAM. Given that -foptimize-crc is new, it may be useful to CC the pass au

Re: [PATCH] c++: handle misspelled concepts and missing #include

2024-12-06 Thread Jason Merrill
On 11/15/24 7:56 PM, David Malcolm wrote: Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/cp/ChangeLog: * name-lookup.cc (suggest_alternative_in_explicit_scope): Gracefully handle non-namespaces, such as scoped enums. * parser.cc (cp_parse

Re: [PATCH v4 2/7] OpenMP: middle-end support for dispatch + adjust_args

2024-12-06 Thread Paul-Antoine Arras
Hi Tobias, Thanks for your thorough review. On 09/10/2024 14:55, Tobias Burnus wrote: Paul-Antoine Arras wrote: This patch adds middle-end support for the `dispatch` construct and the `adjust_args` clause. The heavy lifting is done in `gimplify_omp_dispatch` and `gimplify_call_expr` respectiv

Re: [PATCH] AArch64: Cleanup alignment macros

2024-12-06 Thread Richard Sandiford
Wilco Dijkstra writes: > Change the AARCH64_EXPAND_ALIGNMENT macro into proper function calls to make > future changes easier. Use the existing alignment settings, however avoid > overaligning small array's or structs to 64 bits when there is no benefit. > This gives a small reduction in data and

Patch ping (Re: [PATCH] analyzer: Handle nonnull_if_nonzero attribute [PR117023])

2024-12-06 Thread Jakub Jelinek
Hi! I'd like to ping the https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668699.html patch. The patches it depended on are already committed and there is a patch which depends on this (the builtins shift from nonnull to nonnull_if_nonzero where needed) which has been approved but can't be

[PATCH] arm,testsuite: Add -mtune=cortex-m55 to dlstp-int8x16.c

2024-12-06 Thread Christophe Lyon
Like dlstp-compile-asm-1.c, this test would fail if GCC is configured with non-default options, such as -mtune=cortex-a9. Force -mtune=cortex-m55 to avoid this unexpected issue. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/dlstp-int8x16.c: Add -mtune=cortex-m55 --- gcc/testsuite/gcc.ta

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-06 Thread David Edelsohn
No objection from me, but Ian is the maintainer of libiberty, so I'll defer to him, especially about style and overall software engineering. The C23 change presumably will break on Alpha OSF/1 as well. Does GCC still support OSF/1? It might be preferred to delete the block entirely instead of #i

Re: [PATCH] diagnostics: UX: add doc URLs for attributes (v2)

2024-12-06 Thread David Malcolm
On Thu, 2024-11-21 at 17:36 -0500, David Malcolm wrote: > This is v2 of the patch; v1 was here: >   https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655541.html > > Changed in v2: > * added a new TARGET_DOCUMENTATION_NAME hook for figuring out which >   documentation URL to use when there are m

[committed][OG14] openmp: Fix error reporting in parsing of C++ OpenMP to/from clause

2024-12-06 Thread Andrew Stubbs
From: Kwok Cheung Yeung The final 'else' when checking the motion modifiers is nested one level too deep. This patch should be folded into "OpenMP: Enable 'declare mapper' mappers for 'target update' directives" when merging to mainline. gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_cla

Re: [PATCH] Fix incorrect line numbers in large files bug#108900

2024-12-06 Thread Jeremy Bettis
On Fri, Dec 6, 2024 at 5:27 AM Sam James wrote: > Please ideally use git-send-email and see > https://gcc.gnu.org/contribute.html#patches wrt ChangeLog format and so > on. > > Perhaps you should document in that contribute page how to install git-send-email. It is not a standard git command. In

[committed] arm: testsuite: fix some legacy C tests

2024-12-06 Thread Richard Earnshaw
These tests all lack ISO-C style function definitions. Some deliberatly so. Rather than try to adjust the code and risk changing the nature of the test, add -std=c17 to the test options. gcc/testsuite/ChangeLog: * gcc.target/arm/20031108-1.c: Add -std=c17. * gcc.target/arm/fp16-

Re: [PATCH] arm,testsuite: Add -mtune=cortex-m55 to dlstp-int8x16.c

2024-12-06 Thread Richard Earnshaw (lists)
On 06/12/2024 16:09, Christophe Lyon wrote: > Like dlstp-compile-asm-1.c, this test would fail if GCC is configured > with non-default options, such as -mtune=cortex-a9. > > Force -mtune=cortex-m55 to avoid this unexpected issue. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/mve/dlstp-

[committed][PR tree-optimization/117895] Fix sparc libgo build failure with CRC opts enabled

2024-12-06 Thread Jeff Law
So as noted in the BZ, sparc builds of the golang libraries were failing due to the CRC code. Ultimately this was another mode problem in the table expansion. Essentially when the mode of the resultant crc was different than the mode of the input data we could create mixed mode operations wh

Re: [PATCH] libstdc++: editorconfig: Adjust wildcard patterns

2024-12-06 Thread Jonathan Wakely
On Fri, 6 Dec 2024 at 18:01, wrote: > > From: Matthew Malcomson > > According to the editorconfig file format description, a match against > one of multiple different strings is described with those different > strings separated by commas and within curly braces. E.g. > [{x,y}.txt] > > https

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-06 Thread Ian Lance Taylor
David Edelsohn writes: > On Fri, Dec 6, 2024 at 12:25 PM Rainer Orth > wrote: > >> Hi David, >> >> > No objection from me, but Ian is the maintainer of libiberty, so I'll >> defer >> > to him, especially about style and overall software engineering. >> > >> > The C23 change presumably will break

Re: [committed] RISC-V: Add const to function_shape::get_name [NFC]

2024-12-06 Thread Mark Wielaard
Hi Kito, On Thu, Dec 05, 2024 at 03:12:03PM +0800, Kito Cheng wrote: > function_shape::get_name is the funciton for building intrinsic function name, > the result should not be changed by others once it built. > > So add const to the return type to make sure no one change that by > accident. Thi

Re: [PATCH] AArch64: Cleanup alignment macros

2024-12-06 Thread Wilco Dijkstra
Hi Richard, >> A common case is a constant string which is compared against some >> argument. Most string functions work on 8 or 16-byte quantities. If we >> ensure the whole array fits in one aligned load, we save time in the >> string function. >> >> Runtime data collected for strlen calls shows

Re: [PATCH 2/3] c++: consolidate location printing in error.cc [PR116253]

2024-12-06 Thread Jason Merrill
On 11/12/24 9:02 AM, David Malcolm wrote: Consolidate the location-printing logic in cp/error.cc, as preliminary work towards supporting nested diagnostics (PR other/116253). OK. gcc/cp/ChangeLog: PR other/116253 * error.cc (print_location): Move to earlier in the file.

Re: [PATCH] AArch64: Cleanup alignment macros

2024-12-06 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >> So just to be sure I understand: we still want to align (say) an array >> of 4 chars to 32 bits so that the LDR & STR are aligned, and an array of >> 3 chars to 32 bits so that the LDRH & STRH for the leading two bytes are >> aligned? Is that right? We d

Re: [PATCH 1/3] dwarf: Delete dead code.

2024-12-06 Thread Michal Jireš
On 11/27/24 2:59 PM, Richard Biener wrote: Did you test with -fdebug-types-section? This code should be still needed to generate the linkonce debug-type sections. Note it doesn't work (very well) when combined with LTO. I used the tests in testsuite and now I also tested it with nontrivia

Re: [PATCH v2] c++: P2865R5, Remove Deprecated Array Comparisons from C++26 [PR117788]

2024-12-06 Thread Jason Merrill
On 12/6/24 12:29 PM, Marek Polacek wrote: On Thu, Dec 05, 2024 at 01:15:49PM -0500, Jason Merrill wrote: On 12/4/24 12:27 PM, Marek Polacek wrote: On Tue, Dec 03, 2024 at 04:27:22PM -0500, Jason Merrill wrote: On 12/3/24 2:46 PM, Marek Polacek wrote: On Thu, Nov 28, 2024 at 12:04:56PM -0500,

[PATCH] libstdc++: Add workaround for read(2) EINVAL on macOS and FreeBSD [PR102259]

2024-12-06 Thread Jonathan Wakely
On macOS and FreeBSD read(2) system call can return EINVAL for large sizes, so limit the maximum that we try to read. The calling code in filebuf::xsgetn will loop until it gets the size it wants, so we don't need to loop here. libstdc++-v3/ChangeLog: PR libstdc++/102259 * config/

[PATCH] s390: Fix UNSPEC_CC_TO_INT canonicalization

2024-12-06 Thread Juergen Christ
Canonicalization of comparisons for UNSPEC_CC_TO_INT missed one case causing unnecessarily complex code. This especially seems to hit the Linux kernel. gcc/ChangeLog: * config/s390/s390.cc (s390_canonicalize_comparison): Add missing UNSPEC_CC_TO_INT case. gcc/testsuite/ChangeL

[Fortran, Patch, PR107635, Part 1] Rework handling of allocatable components in derived type coarrays.

2024-12-06 Thread Andre Vehreschild
Hi all, I had to dive deeply into the issue with handling allocatable components in derived types and to find a future proof solution. I hope do have found a universal and flexible one now: For each allocatable (or pointer) component in a derived type a coarray token is required. While this is qu

[PATCH] arm: remove obsolete vcond expanders

2024-12-06 Thread Richard Earnshaw
The vcond{,u} expander paterns have been declared as obsolete. Remove them from the Arm backend. gcc/ChangeLog: PR target/114189 * config/arm/arm-protos.h (arm_expand_vcond): Delete prototype. * config/arm/arm.cc (arm_expand_vcond): Delete function. * config/arm/v

[committed] i386: Fix gcc.target/i386/pr101716.c (and some related cleanups)

2024-12-06 Thread Uros Bizjak
Fix pr101716.c testcase scan-assembler failure. The combine pass will not combine instructions that use registers in TARGET_CLASS_LIKELY_SPILLED class, such as %eax return register in AREG class. Change the testcase to use pseudos only and explicitly scan for zero_extendsidi pattern name. While

Re: [PATCH v3] arm: [MVE intrinsics] Fix support for predicate constants [PR target/114801]

2024-12-06 Thread Christophe Lyon
On Fri, 6 Dec 2024 at 12:41, Richard Earnshaw (lists) wrote: > > On 04/12/2024 20:56, Christophe Lyon wrote: > > On Wed, 4 Dec 2024 at 12:39, Richard Earnshaw (lists) > > wrote: > >> > >> On 25/11/2024 20:08, Christophe Lyon wrote: > >>> In this PR, we have to handle a case where MVE predicates a

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-12-06 Thread Qing Zhao
> On Dec 6, 2024, at 10:56, Martin Uecker wrote: > > Am Freitag, dem 06.12.2024 um 14:16 + schrieb Qing Zhao: >> >>> On Dec 5, 2024, at 17:31, Martin Uecker wrote: >>> >>> Am Donnerstag, dem 05.12.2024 um 21:09 + schrieb Qing Zhao: > On Dec 3, 2024, at 10:29, Qing Zhao wro

[PATCH] libstdc++: editorconfig: Adjust wildcard patterns

2024-12-06 Thread mmalcomson
From: Matthew Malcomson According to the editorconfig file format description, a match against one of multiple different strings is described with those different strings separated by commas and within curly braces. E.g. [{x,y}.txt] https://editorconfig.org/, under "Wildcard Patterns". The

Re: 3rd Ping: [Middle-end][PATCH v4 0/3][RFC]Provide more contexts for -Warray-bounds and -Wstringop-* warning messages

2024-12-06 Thread Sam James
Qing Zhao writes: > This is the 3rd ping of the Middle-end review for this patch. > Jeff, would you be able to take a look? (In part because I know you've had a lot of comments and feedback on the middle-end warnings before). The diagnostics bits are OK'd already. I've been running this on dist

Re: [PATCH] c: special-case some "bool" errors with C23 [PR117629]

2024-12-06 Thread Sam James
David Malcolm writes: > This patch attempts to provide better error messages for > code compiled with C23 that hasn't been updated for > "bool", "true", and "false" becoming keywords (based on > a brief review of the Gentoo bug tracker links given at > https://gcc.gnu.org/pipermail/gcc/2024-Novem

Re: [RFC][PATCH] aarch64: Fold lsl+lsr+orr to rev for half-width shifts

2024-12-06 Thread Richard Sandiford
Sorry for the slow reply. Dhruv Chawla writes: > This patch modifies the intrinsic expanders to expand svlsl and svlsr to > unpredicated forms when the predicate is a ptrue. It also folds the > following pattern: > >lsl , , >lsr , , >orr , , > > to: > >revb/h/w , > > when the

Re: [patch,avr] Disable CRC lookup tables

2024-12-06 Thread Oleg Endo
On Fri, 2024-12-06 at 06:32 -0700, Jeff Law wrote: > > On 12/6/24 5:23 AM, Sam James wrote: > > Georg-Johann Lay writes: > > > > > This patch disables CRC lookup tables which consume quite some RAM. > > > > Given that -foptimize-crc is new, it may be useful to CC the pass > > authors in case th

Re: GCN: Fix 'real_from_integer' usage

2024-12-06 Thread Andrew Stubbs
On 12/6/24 13:56, Thomas Schwinge wrote: Hi Andrew! On 2024-12-05T15:14:45+0100, I wrote: On 2020-01-31T11:20:14+, Andrew Stubbs wrote: This is one of those things I don't know why we didn't notice sooner. ..., and here's another thing I don't know why we didn't notice sooner. ;-P (Cate

Re: [patch,lra] PR116778 we need a full live range info after rematerialization

2024-12-06 Thread Vladimir Makarov
The proposed patch can be a fix and you can commit it.  The only request is not to close PR for now. LRA rematerialization sub-pass rematerializes insn containing only pseudos assigned to hard regs and should not change live-range of spilling pseudos.  So  sentence "Rematerialization sometimes

[PATCH] middle-end/117932 - speed up DF solver

2024-12-06 Thread Richard Biener
The following addresses slow bitmap operations for maintaining the iteration order of df_worklist_dataflow_doublequeue for large number of basic-blocks. One change is switching the worklist and pending bitmaps to tree view, another change is avoiding the fully populated initial bitmap for the firs

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-12-06 Thread Martin Uecker
Am Freitag, dem 06.12.2024 um 14:16 + schrieb Qing Zhao: > > > On Dec 5, 2024, at 17:31, Martin Uecker wrote: > > > > Am Donnerstag, dem 05.12.2024 um 21:09 + schrieb Qing Zhao: > > > > > > > On Dec 3, 2024, at 10:29, Qing Zhao wrote: > > > > > > > > > > > > > > > > > > > > >

Re: [PATCH v2] c++: P2865R5, Remove Deprecated Array Comparisons from C++26 [PR117788]

2024-12-06 Thread Marek Polacek
On Thu, Dec 05, 2024 at 01:15:49PM -0500, Jason Merrill wrote: > On 12/4/24 12:27 PM, Marek Polacek wrote: > > On Tue, Dec 03, 2024 at 04:27:22PM -0500, Jason Merrill wrote: > > > On 12/3/24 2:46 PM, Marek Polacek wrote: > > > > On Thu, Nov 28, 2024 at 12:04:56PM -0500, Jason Merrill wrote: > > > >

  1   2   >