Re: [PATCH] Removed a duplicate line of code.

2024-12-07 Thread Andrew Pinski
On Sat, Dec 7, 2024 at 5:55 PM Abdo Eid wrote: > > While searching for the implementaion of the `fgetwc()`, I found that its > using declaration is redundant and removed it. Two things about this patch. ChangeLog goes in the commit message now rather than a patch to ChangeLog (the entry is autom

Re: [PATCH v3] zero_extend(not) -> xor optimization [PR112398]

2024-12-07 Thread Jeff Law
On 12/7/24 11:33 AM, Hans-Peter Nilsson wrote: On Sat, 30 Nov 2024, Jeff Law wrote: On 11/28/24 5:26 AM, Alexey Merzlyakov wrote: This patch adds optimization of the following patterns: (zero_extend:M (subreg:N (not:O==M (X:Q==M -> (xor:M (zero_extend:M (subreg:N (X:M)), mask

[PATCH] Removed a duplicate line of code.

2024-12-07 Thread Abdo Eid
While searching for the implementaion of the `fgetwc()`, I found that its using declaration is redundant and removed it. diff --git a/ChangeLog b/ChangeLog index 9660c5260a7..3c2952abb69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2024-12-08 Abdo Eid + * include/c_compatibility/wch

[PATCH v1 6/6] RISC-V: Refine signed SAT_TRUNC testcase dump check to tree optimized

2024-12-07 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_TRUNC exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .

[PATCH v1 2/6] RISC-V: Refine unsigned SAT_SUB testcase dump check to tree optimized

2024-12-07 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_SUB exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

[PATCH v1 1/6] RISC-V: Refine unsigned SAT_ADD testcase dump check to tree optimized

2024-12-07 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_ADD exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

[PATCH v1 5/6] RISC-V: Refine signed SAT_SUB testcase dump check to tree optimized

2024-12-07 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_SUB exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

[PATCH v1 4/6] RISC-V: Refine signed SAT_ADD testcase dump check to tree optimized

2024-12-07 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_ADD exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

[PATCH v1 3/6] RISC-V: Refine unsigned SAT_TRUNC testcase dump check to tree optimized

2024-12-07 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_TRUNC exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .

Re: [RFC 0/4] Hard Register Constraints

2024-12-07 Thread Stefan Schulze Frielinghaus
On Sat, Dec 07, 2024 at 08:49:20AM +0100, Georg-Johann Lay wrote: > Is there a PR for this feature? (Just to make sure that I don't > miss progress on this I could CC to the PR). No. However, I can CC you in case of further patch revisions. Cheers, Stefan > > Johann > > Am 10.09.24 um 16:20

Re: [PATCH v6 3/7] Use incoming small integer argument type if possible

2024-12-07 Thread H.J. Lu
On Sun, Dec 8, 2024, 12:33 AM Jeff Law wrote: > > > On 12/4/24 1:47 PM, H.J. Lu wrote: > > For targets, like x86, which define TARGET_PROMOTE_PROTOTYPES to return > > true, all integer arguments smaller than int are passed as int: > > > > [hjl@gnu-tgl-3 pr14907]$ cat x.c > > extern int baz (char

[PATCH] tree-eh: Don't crash on GIMPLE_TRY_FINALLY with empty cleanup sequence [PR117845]

2024-12-07 Thread Simon Martin
The following valid code triggers an ICE with -fsanitize=address === cut here === void l() { auto const ints = {0,1,2,3,4,5}; for (auto i : { 3 } ) { __builtin_printf("%d ", i); } } === cut here === The problem is that honor_protect_cleanup_actions does not expect the cleanup

[SPARC] Add functional comments for VIS4B instructions

2024-12-07 Thread Eric Botcazou
Applied on the mainline. 2024-12-07 Eric Botcazou * config/sparc/sparc.md (VIS4B instructions): Add comments. -- Eric Botcazoudiff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 5fd18b3ca27..159518d4b8f 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/spa

Re: [PATCH v3] zero_extend(not) -> xor optimization [PR112398]

2024-12-07 Thread Hans-Peter Nilsson
On Sat, 30 Nov 2024, Jeff Law wrote: > > > On 11/28/24 5:26 AM, Alexey Merzlyakov wrote: > > This patch adds optimization of the following patterns: > > > >(zero_extend:M (subreg:N (not:O==M (X:Q==M -> > >(xor:M (zero_extend:M (subreg:N (X:M)), mask)) > >... where the mask is GE

Re: [PATCH v6 3/7] Use incoming small integer argument type if possible

2024-12-07 Thread Jeff Law
On 12/4/24 1:47 PM, H.J. Lu wrote: For targets, like x86, which define TARGET_PROMOTE_PROTOTYPES to return true, all integer arguments smaller than int are passed as int: [hjl@gnu-tgl-3 pr14907]$ cat x.c extern int baz (char c1); int foo (char c1) { return baz (c1); } [hjl@gnu-tgl-3 pr149

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

2024-12-07 Thread Jeff Law
On 12/6/24 5:39 AM, Richard Biener wrote: 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. Nothing specific. I'm leery

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

2024-12-07 Thread Jeff Law
On 12/7/24 8:38 AM, Jason Merrill wrote: On 12/6/24 7:37 AM, Richard Biener wrote: 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 holiday

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

2024-12-07 Thread Jason Merrill
On 12/6/24 7:37 AM, Richard Biener wrote: 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 d

Re: [PATCH 3/3] c++: use diagnostic nesting [PR116253]

2024-12-07 Thread Jason Merrill
On 12/6/24 5:52 PM, David Malcolm wrote: On Fri, 2024-12-06 at 12:33 -0500, Jason Merrill wrote: On 11/12/24 9:02 AM, David Malcolm wrote: [from 0/3] The most natural way to present textual output is to use indentation, so patch 1 does this.  However, our existing textual format uses the source

Re: [PATCH 1/2] c++: print z candidate count and number them

2024-12-07 Thread Jason Merrill
On 11/15/24 8:02 PM, David Malcolm wrote: This patch is a followup to: "c++: use diagnostic nesting [PR116253]" Following Sy Brand's UX suggestions in P2429R0 for example 1, this patch tweaks print_z_candidates to add a note about the number of candidates, and adds a candidate number to each

[PATCH] middle-end/117932 - further speedup DF worklist solver

2024-12-07 Thread Richard Biener
The triple-indirect memory reference we perform for each incoming edge age <= last_change_age[bbindex_to_postorder[e->src->index]] is pretty bad and when there are a lot of small BBs like for the PR26854 testcase this shows in the profile. The following reduces this by one level by making last_cha

Re: [PATCH] aarch64: Fix ICE happening in SET_TYPE_VECTOR_SUBPARTS with libgccjit

2024-12-07 Thread Antoni Boucher
The patch was approved by Richard Sandiford on the forge (https://forge.sourceware.org/gcc/gcc-TEST/pulls/29#issuecomment-490). Le 2024-12-05 à 21 h 35, Antoni Boucher a écrit : Hi. This is a patch for the bug 117923. I'd like to know if there's a simpler fix for this. I tried keeping all the f

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

2024-12-07 Thread Jason Merrill
On 12/6/24 5:02 PM, Marek Polacek wrote: 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

Re: [patch,avr] Disable CRC lookup tables

2024-12-07 Thread Georg-Johann Lay
Am 07.12.24 um 02:03 schrieb 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]

Re: [patch,avr] Assert minimal required bit width of section_common::flags.

2024-12-07 Thread Georg-Johann Lay
...the patch Am 07.12.24 um 14:36 schrieb Georg-Johann Lay: This patch implements an alarm should we ever run out of section flags bits. Ok for trunk? Johann -- AVR: Assert minimal required bit width of section_common::flags. gcc/ * config/avr/avr.cc (avr_ctz): New constexpr function.

[patch,avr] Assert minimal required bit width of section_common::flags.

2024-12-07 Thread Georg-Johann Lay
This patch implements an alarm should we ever run out of section flags bits. Ok for trunk? Johann -- AVR: Assert minimal required bit width of section_common::flags. gcc/ * config/avr/avr.cc (avr_ctz): New constexpr function. (section_common::flags): Assert minimal bit width.

Re: [Patch, fortran] PR116261 - [15 regression] gfortran.dg/sizeof_6.f90 -O1 timeout since r15-2739-g4cb07a38233

2024-12-07 Thread Andre Vehreschild
Hi Paul, the fix looks fine to me. Ok for mainline. - Andre On Sat, 7 Dec 2024 09:17:57 + Paul Richard Thomas wrote: > Hi All, > > I must apologise for reintroducing this regression again, after the second > application of the fix for PR102689. I must admit that I had totally > forgotten a

Re: [PATCH v2] fold fold_truth_andor field merging into ifcombine

2024-12-07 Thread Alexandre Oliva
On Dec 3, 2024, Richard Biener wrote: > On Fri, Nov 22, 2024 at 10:22 PM Alexandre Oliva wrote: >> + /* Identify the load, if there is one. */ >> + if (TREE_CODE (exp) == SSA_NAME >> + && !SSA_NAME_IS_DEFAULT_DEF (exp)) >> +{ >> + gimple *def = SSA_NAME_DEF_STMT (exp); >> +

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

2024-12-07 Thread Jonathan Wakely
On Fri, 6 Dec 2024 at 17:56, Jonathan Wakely wrote: > > 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. > > libs

Re: [PATCH] tree-optimization/117912 - bogus address equivalences for __builtin_object_size

2024-12-07 Thread Siddhesh Poyarekar
On 2024-12-05 05:37, Richard Biener wrote: VN again is the culprit for exploiting address equivalences before __builtin_object_size got the chance to do its job. This time it isn't about union members but adjacent structure fields where an address to one after the last element of an array field

[PATCH] c++: check_flexarray fixes [PR117516]

2024-12-07 Thread Jakub Jelinek
Hi! On the pr117516.C testcase check_flexarrays and its helper functions have exponential complexity, plus it reports the same bug over and over again in some cases instead of reporting perhaps other bugs. The functions want to diagnose flexible array member (and strangely [0] arrays too) followed

[committed] libstdc++: Fix typo in Doxygen comment in

2024-12-07 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/std/format: Fix typo in Doxygen comment. --- Pushed as obvious. libstdc++-v3/include/std/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index 6313d084f45..e7e0

Re: [PATCH] i386: x r<< (c - y) to x r>> y etc. optimization [PR117930]

2024-12-07 Thread Uros Bizjak
On Sat, Dec 7, 2024 at 11:07 AM Jakub Jelinek wrote: > > Hi! > > The following patch optimizes x r<< (c - y) to x r>> y, > x r>> (c - y) to x r<< y, x r<< (c + y) to x r<< y and > x r>> (c + y) to x r>> y if c is a multiple of x's bitsize. > > Bootstrapped/regtested on x86_64-linux and i686-linux,

[PATCH] i386: x r<< (c - y) to x r>> y etc. optimization [PR117930]

2024-12-07 Thread Jakub Jelinek
Hi! The following patch optimizes x r<< (c - y) to x r>> y, x r>> (c - y) to x r<< y, x r<< (c + y) to x r<< y and x r>> (c + y) to x r>> y if c is a multiple of x's bitsize. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk or do you want s/Other/Counter/ and s/orotate/crotate/

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

2024-12-07 Thread Denis Chertykov
пт, 6 дек. 2024 г. в 19:32, 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 spil

[Patch, fortran] PR116261 - [15 regression] gfortran.dg/sizeof_6.f90 -O1 timeout since r15-2739-g4cb07a38233

2024-12-07 Thread Paul Richard Thomas
Hi All, I must apologise for reintroducing this regression again, after the second application of the fix for PR102689. I must admit that I had totally forgotten about it, even though it was the reason for withdrawing the patch the first time, and the failure was sporadic on my system, so I missed

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

2024-12-07 Thread Martin Uecker
Am Freitag, dem 06.12.2024 um 16:13 + schrieb Qing Zhao: > > > On Dec 6, 2024, at 10:56, Martin Uecker wrote: > > > > Am Freitag, dem 06.12.2024 um 14:16 + schrieb Qing Zhao: > > > ... > > > > > > > > I think the relevant scenario is where you assign the struct and > > > > not a poin