Re: [pushed][PATCH v1] LoongArch: Fixed an issue with the implementation of the template atomic_compare_and_swapsi.

2024-03-08 Thread chenglulu
在 2024/3/9 上午9:48, chenglulu 写道: Pushed to r14-9407. Cherry picked to r13-8413 and r12-10200. 在 2024/3/7 上午9:12, Lulu Cheng 写道: If the hardware does not support LAMCAS, atomic_compare_and_swapsi needs to be implemented through "ll.w+sc.w". In the implementation of the instruction

[PATCH v2 2/2] bugzilla: remove `gcc-bugs@` mailing list address

2024-03-08 Thread Ben Boeckel
Bugzilla is preferred today. Use a URL that gives context about gathering information prior to actually filing a bug at Bugzilla. ChangeLog: * config-ml.in: Replace gcc-bugs@ with bug reporting link. * symlink-tree: Replace gcc-bugs@ with bug reporting link.

[PATCH v2 1/2] email: fix patch email addresses

2024-03-08 Thread Ben Boeckel
ChangeLog: * config-ml.in: Update patch email address. * symlink-tree: Update patch email address. Signed-off-by: Ben Boeckel --- v1 -> v2: - add Signed-off-by --- config-ml.in | 2 +- symlink-tree | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: libbacktrace patch committed: Don't assume compressed section aligned

2024-03-08 Thread H.J. Lu
On Fri, Mar 8, 2024 at 2:48 PM Fangrui Song wrote: > > On ELF64, it looks like BFD uses 8-byte alignment for compressed > `.debug_*` sections while gold/lld/mold use 1-byte alignment. I do not > know how the Solaris linker sets the alignment. > > The specification's wording makes me confused

[PATCH wwwdocs 1/1] [RESEND] gcc-14: document P1689R5 scanning output support

2024-03-08 Thread Ben Boeckel
--- htdocs/gcc-14/changes.html | 11 +++ 1 file changed, 11 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 7278f753..b506eeb1 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -112,6 +112,17 @@ a work-in-progress.

Re: [pushed][PATCH v1] LoongArch: Fixed an issue with the implementation of the template atomic_compare_and_swapsi.

2024-03-08 Thread chenglulu
Pushed to r14-9407. 在 2024/3/7 上午9:12, Lulu Cheng 写道: If the hardware does not support LAMCAS, atomic_compare_and_swapsi needs to be implemented through "ll.w+sc.w". In the implementation of the instruction sequence, it is necessary to determine whether the two registers are equal. Since

Re: [pushed][PATCH] LoongArch: testsuite: Add compilation options to the regname-fp-s9.c.

2024-03-08 Thread chenglulu
Pushed to r14-9408. 在 2024/3/7 上午9:50, Lulu Cheng 写道: When the value of the macro DEFAULT_CFLAGS is set to '-ansi -pedantic-errors', regname-s9-fp.c will test to fail. To solve this problem, add the compilation option '-Wno-pedantic -std=gnu90' to this test case. gcc/testsuite/ChangeLog:

Re: [PATCH v1] LoongArch: Fixed an issue with the implementation of the template atomic_compare_and_swapsi.

2024-03-08 Thread chenglulu
在 2024/3/8 下午2:22, Xi Ruoyao 写道: On Thu, 2024-03-07 at 21:07 +0800, chenglulu wrote: 在 2024/3/7 下午8:52, Xi Ruoyao 写道: It should be better to extend the expected value before the ll/sc loop (like what LLVM does), instead of repeating the extending in each iteration.  Something like: I wanted

[committed] libstdc++: Do not require a time-of-day when parsing sys_days [PR114240]

2024-03-08 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- When parsing a std::chrono::sys_days (or a sys_time with an even longer period) we should not require a time-of-day to be present in the input, because we can't represent that in the result type anyway. Rather than trying to decide which

[committed] libstdc++: Fix parsing of leap seconds as chrono::utc_time [PR114279]

2024-03-08 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- Implementing all chrono::from_stream overloads in terms of chrono::sys_time meant that a leap second time like 23:59:60.001 cannot be parsed, because that cannot be represented in a sys_time. The fix to support parsing leap seconds as utc_time is

Re: [PATCH v2] c++: Check module attachment instead of just purview when necessary [PR112631]

2024-03-08 Thread Nathaniel Shead
On Fri, Mar 08, 2024 at 10:19:52AM -0500, Jason Merrill wrote: > On 3/7/24 21:55, Nathaniel Shead wrote: > > On Mon, Nov 27, 2023 at 03:59:39PM +1100, Nathaniel Shead wrote: > > > On Thu, Nov 23, 2023 at 03:03:37PM -0500, Nathan Sidwell wrote: > > > > On 11/20/23 04:47, Nathaniel Shead wrote: > >

Re: libbacktrace patch committed: Don't assume compressed section aligned

2024-03-08 Thread Fangrui Song
On ELF64, it looks like BFD uses 8-byte alignment for compressed `.debug_*` sections while gold/lld/mold use 1-byte alignment. I do not know how the Solaris linker sets the alignment. The specification's wording makes me confused whether it really requires 8-byte alignment, even if a non-packed

libbacktrace patch committed: Don't assume compressed section aligned

2024-03-08 Thread Ian Lance Taylor
Reportedly when lld compresses debug sections, it fails to set the alignment of the compressed section such that the compressed header can be read directly. To me this seems like a bug in lld. However, libbacktrace needs to work around it. This patch, originally by the GitHub user ubyte, does

[pushed][PR113790][LRA]: Fixing LRA ICE on riscv64

2024-03-08 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113790 The patch was successfully bootstrapped and tested on x86-64,ppc64le, and aarch64. commit cebbaa2a84586a7345837f74a53b7a0263bf29ee Author: Vladimir N. Makarov Date: Fri Mar 8 14:48:33 2024 -0500

Re: [PATCH] gomp: testsuite: improve compatibility of bad-array-section-3.c [PR113428]

2024-03-08 Thread Richard Sandiford
Richard Earnshaw writes: > This test generates different warnings on ilp32 targets because the size > of an integer matches the size of a pointer. Avoid this by using > signed char. > > gcc/testsuite: > > PR testsuite/113428 > * gcc.dg/gomp/bad-array-section-c-3.c: Use signed char

Re: [PATCH] Revert "Pass GUILE down to subdirectories"

2024-03-08 Thread Tom Tromey
> "Andrew" == Andrew Burgess writes: Andrew> After once again forgetting to add GUILE=guile2.2 to my GDB build I was Andrew> thinking about this issue again. Andrew> Given that GDB has a --with-guile=... configure option, and that our Andrew> configure scripts try to identify a matching

Re: [PATCH] middle-end/113680 - Optimize (x - y) CMP 0 as x CMP y

2024-03-08 Thread Ken Matsui
On Thu, Mar 7, 2024 at 10:49 PM Richard Biener wrote: > > On Thu, Mar 7, 2024 at 8:29 PM Ken Matsui wrote: > > > > On Tue, Mar 5, 2024 at 7:58 AM Richard Biener > > wrote: > > > > > > On Tue, Mar 5, 2024 at 1:51 PM Ken Matsui > > > wrote: > > > > > > > > On Tue, Mar 5, 2024 at 12:38 AM

Re: [PATCH 01/11] gcc/doc/extend.texi: Sort built-in traits alphabetically

2024-03-08 Thread Ken Matsui
On Fri, Mar 8, 2024 at 8:38 AM Patrick Palka wrote: > > Hi Ken, > > This patch series LGTM, thanks for these documentation improvements. Thank you for your time to review! I actually have some changes to these patches, so I will re-send those to you once they are ready. > > On Fri, 1 Mar 2024,

Re: [PATCH v14 23/26] c++: Implement __is_invocable built-in trait

2024-03-08 Thread Ken Matsui
On Fri, Mar 8, 2024 at 9:17 AM Patrick Palka wrote: > > On Wed, 28 Feb 2024, Ken Matsui wrote: > > > This patch implements built-in trait for std::is_invocable. > > > > gcc/cp/ChangeLog: > > > > * cp-trait.def: Define __is_invocable. > > * constraint.cc (diagnose_trait_expr): Handle

Re: [PATCH v14 26/26] libstdc++: Optimize std::is_nothrow_invocable compilation performance

2024-03-08 Thread Ken Matsui
On Fri, Mar 8, 2024 at 9:22 AM Patrick Palka wrote: > > On Wed, 28 Feb 2024, Ken Matsui wrote: > > > This patch optimizes the compilation performance of > > std::is_nothrow_invocable by dispatching to the new > > __is_nothrow_invocable built-in trait. > > > > libstdc++-v3/ChangeLog: > > > >

Re: [PATCH v2] bpf: add size threshold for inlining mem builtins

2024-03-08 Thread Jose E. Marchesi
Hi Faust. OK. Thanks! > [Changes from v1: > - Error if threshold is exceeded instead of silently emitting libcall > - Update test accordingly > - Expand documentation to explain this behavior ] > > BPF cannot fall back on library calls to implement memmove, memcpy and > memset, so we

Re: [PATCH v14 26/26] libstdc++: Optimize std::is_nothrow_invocable compilation performance

2024-03-08 Thread Patrick Palka
On Wed, 28 Feb 2024, Ken Matsui wrote: > This patch optimizes the compilation performance of > std::is_nothrow_invocable by dispatching to the new > __is_nothrow_invocable built-in trait. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_nothrow_invocable): Use >

[PATCH v2] bpf: add size threshold for inlining mem builtins

2024-03-08 Thread David Faust
[Changes from v1: - Error if threshold is exceeded instead of silently emitting libcall - Update test accordingly - Expand documentation to explain this behavior ] BPF cannot fall back on library calls to implement memmove, memcpy and memset, so we attempt to expand these inline always if

Re: [PATCH v14 23/26] c++: Implement __is_invocable built-in trait

2024-03-08 Thread Patrick Palka
On Wed, 28 Feb 2024, Ken Matsui wrote: > This patch implements built-in trait for std::is_invocable. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_invocable. > * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_INVOCABLE. > * semantics.cc (trait_expr_value):

[COMMITTED] arm: testsuite: tweak bics_3.c [PR113542]

2024-03-08 Thread Richard Earnshaw
This test was too simple, which meant that the compiler was sometimes able to find a better optimization of the code than using a BICS instruction. Fix this by changing the test slightly to produce a sequence where BICS should always be the preferred solution. gcc/testsuite: PR

[PATCH] c++: explicit inst of template method not generated [PR110323]

2024-03-08 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Consider constexpr int VAL = 1; struct foo { template void bar(typename std::conditional::type arg) { } }; template void foo::bar<1>(int arg); where we since r11-291 fail to emit the code for the explicit

Re: [PATCH] contrib/gcc-changelog/git_check_commit.py: Implement --num-commits

2024-03-08 Thread Patrick Palka
On Wed, 28 Feb 2024, Ken Matsui wrote: > This patch implements a --num-commits (-n) flag for shorthand for > the range of hash~N..hash commits. > > contrib/ChangeLog: > > * gcc-changelog/git_check_commit.py: Implement --num-commits. LGTM > > Signed-off-by: Ken Matsui > --- >

Re: [PATCH 01/11] gcc/doc/extend.texi: Sort built-in traits alphabetically

2024-03-08 Thread Patrick Palka
Hi Ken, This patch series LGTM, thanks for these documentation improvements. On Fri, 1 Mar 2024, Ken Matsui wrote: > This patch sorts built-in traits alphabetically for better codebase > consistency and easier future integration of changes. > > gcc/ChangeLog: > > * doc/extend.texi (Type

Re: Fix 'char' initialization, copy, check in 'libgomp.oacc-fortran/acc-memcpy.f90'

2024-03-08 Thread Tobias Burnus
Hi Thomas, Am 08.03.24 um 12:15 schrieb Thomas Schwinge: OK to push "Fix 'char' initialization, copy, check in 'libgomp.oacc-fortran/acc-memcpy.f90'", see attached? OK. I think there was some remaining code around the problem that HUGE(1_int8) = 127 and '-128_int8' is invalid because in

Re: nvptx: 'cuDeviceGetCount' failure is fatal

2024-03-08 Thread Thomas Schwinge
Hi Tobias! On 2024-03-07T15:28:21+0100, Tobias Burnus wrote: > Thomas Schwinge wrote: >> OK to push the attached "nvptx: 'cuDeviceGetCount' failure is fatal"? > > I think the real question is: what does a 'cuDeviceGetCount' fail mean? Internally to the CUDA stack: the error codes that you've

Re: [PATCH v2] c++: Check module attachment instead of just purview when necessary [PR112631]

2024-03-08 Thread Jason Merrill
On 3/7/24 21:55, Nathaniel Shead wrote: On Mon, Nov 27, 2023 at 03:59:39PM +1100, Nathaniel Shead wrote: On Thu, Nov 23, 2023 at 03:03:37PM -0500, Nathan Sidwell wrote: On 11/20/23 04:47, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu. I don't have write access. --

Re: [PATCH v2] contrib: Improve dg-extract-results.sh's Python detection

2024-03-08 Thread Jeff Law
On 3/7/24 07:27, Sam James wrote: 'python' on some systems (e.g. SLES 15) might be Python 2. Prefer python3, then python, then python2 (as the script still tries to work there). contrib/ChangeLog: * dg-extract-results.sh: Check for python3 before python. Check for python2 last. OK.

[COMMITTED] ARM: Fix builtin-bswap-1.c test [PR113915]

2024-03-08 Thread Wilco Dijkstra
On Thumb-2 the use of CBZ blocks conditional execution, so change the test to compare with a non-zero value. gcc/testsuite/ChangeLog: PR target/113915 * gcc.target/arm/builtin-bswap.x: Fix test to avoid emitting CBZ. --- diff --git a/gcc/testsuite/gcc.target/arm/builtin-bswap.x

[PATCH] ipa: Fix C++ member ptr indirect inlining (PR 114254, PR 108802)

2024-03-08 Thread Martin Jambor
Hi, Even though we have had code to handle creation of indirect call graph edges (so that these calls can than be made direct as part of IPA-CP and inlining and eventually also inlined) for C++ member pointers for many years, it turns out that it does not work for lambdas and that it has been

Re: [PATCH v1] VECT: Bugfix ICE for vectorizable_store when both len and mask

2024-03-08 Thread Richard Biener
On Fri, Mar 8, 2024 at 2:59 PM Richard Biener wrote: > > On Fri, Mar 8, 2024 at 1:04 AM wrote: > > > > From: Pan Li > > > > This patch would like to fix one ICE in vectorizable_store for both the > > loop_masks and loop_lens. The ICE looks like below with "-march=rv64gcv > > -O3". > > > >

Re: [PATCH v1] VECT: Bugfix ICE for vectorizable_store when both len and mask

2024-03-08 Thread Richard Biener
On Fri, Mar 8, 2024 at 1:04 AM wrote: > > From: Pan Li > > This patch would like to fix one ICE in vectorizable_store for both the > loop_masks and loop_lens. The ICE looks like below with "-march=rv64gcv -O3". > > during GIMPLE pass: vect > test.c: In function ‘d’: > test.c:6:6: internal

Re: [PATCH v2] openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls

2024-03-08 Thread Thomas Schwinge
Hi! On 2024-01-29T17:48:47+, Kwok Cheung Yeung wrote: > A splay-tree was previously used to lookup equivalent target addresses > for a given host address on offload targets. However, as splay-trees can > modify their structure on lookup, they are not suitable for concurrent > access from

Re: GCN: The original meaning of 'GCN_SUPPRESS_HOST_FALLBACK' isn't applicable (non-shared memory system)

2024-03-08 Thread Andrew Stubbs
On 08/03/2024 10:16, Thomas Schwinge wrote: Hi! So, attached here is now a different patch "GCN: The original meaning of 'GCN_SUPPRESS_HOST_FALLBACK' isn't applicable (non-shared memory system)", that takes a different approach re clarifying the two orthogonal aspects that the

[patch,avr,applied] Add an insn combine pattern for offset computation.

2024-03-08 Thread Georg-Johann Lay
Computing uint16_t += 2 * uint8_t can occur when an offset into a 16-bit array is computed. Without this pattern is costs six instructions: A move (1), a zero-extend (1), a shift (2) and an addition (2). With this pattern it costs 4. Johann -- AVR: Add an insn combine pattern for offset

[PATCH] tree-optimization/114269 - 434.zeusmp regression after SCEV analysis fix

2024-03-08 Thread Richard Biener
The following addresses a performance regression caused by the recent SCEV analysis fix with regard to folding multiplications and undefined behavior on overflow. We do not handle (T) { a, +, b } * c but can treat sign-conversions from unsigned by performing the multiplication in the unsigned

Re: [PATCH] testsuite: Fix up pr113617 test for darwin [PR113617]

2024-03-08 Thread Richard Biener
On Fri, 8 Mar 2024, Jakub Jelinek wrote: > Hi! > > The test attempts to link a shared library, and apparently Darwin doesn't > allow by default for shared libraries to contain undefined symbols. > > The following patch just adds dummy definitions for the symbols, so that > the library no longer

[PATCH] fix PowerPC < 7 w/ Altivec not to default to power7

2024-03-08 Thread Rene Rebe
This might not be the best timing -short before a major release-, however, Sam just commented on the bug I filled years ago [1], so here we go: Glibc uses .machine to determine assembler optimizations to use. However, since reworking the rs6000 .machine output selection in commit

Fix 'char' initialization, copy, check in 'libgomp.oacc-fortran/acc-memcpy.f90' (was: [patch] OpenACC: Add Fortran routines acc_{alloc,free,hostptr,deviceptr,memcpy_{to,from}_device*})

2024-03-08 Thread Thomas Schwinge
Hi Tobias! On 2024-02-19T22:36:51+0100, Tobias Burnus wrote: > --- /dev/null > +++ b/libgomp/testsuite/libgomp.oacc-fortran/acc-memcpy.f90 OK to push "Fix 'char' initialization, copy, check in 'libgomp.oacc-fortran/acc-memcpy.f90'", see attached? Grüße Thomas > @@ -0,0 +1,47 @@ > +! {

Re: [PATCH] bb-reorder: Fix assertion

2024-03-08 Thread Richard Biener
On Fri, 8 Mar 2024, Jakub Jelinek wrote: > Hi! > > When touching bb-reorder yesterday, I've noticed the checking assert > doesn't actually check what it meant to. > Because asm_noperands returns >= 0 for inline asm patterns (in that case > number of input+output+label operands, so asm goto has

GCN, nvptx: Errors during device probing are fatal (was: Stabilizing flaky libgomp GCN target/offloading testing)

2024-03-08 Thread Thomas Schwinge
Hi! On 2024-02-21T13:34:01+0100, I wrote: > On 2024-02-01T15:49:02+0100, Richard Biener wrote: >> On Thu, 1 Feb 2024, Thomas Schwinge wrote: >>> [...] what I >>> got with '-march=gfx1100' for AMD Radeon RX 7900 XTX. [...] > >>> [...] execution test FAILs. Not all FAILs appear all the time

Re: GCN: Even with 'GCN_SUPPRESS_HOST_FALLBACK' set, failure to 'init_hsa_runtime_functions' is not fatal

2024-03-08 Thread Thomas Schwinge
Hi! On 2024-03-07T15:07:32+0100, Tobias Burnus wrote: > first, I have the feeling we talk about (more or less) the same code > region and use the same words – but we talk about rather different > things. Thus, you confuse me (and possibly Andrew) – and my reply > confuses you. That, indeed,

GCN: The original meaning of 'GCN_SUPPRESS_HOST_FALLBACK' isn't applicable (non-shared memory system) (was: GCN: Even with 'GCN_SUPPRESS_HOST_FALLBACK' set, failure to 'init_hsa_runtime_functions' is

2024-03-08 Thread Thomas Schwinge
Hi! So, attached here is now a different patch "GCN: The original meaning of 'GCN_SUPPRESS_HOST_FALLBACK' isn't applicable (non-shared memory system)", that takes a different approach re clarifying the two orthogonal aspects that the 'GCN_SUPPRESS_HOST_FALLBACK' environment variable controls:

Re: [PATCH v2] libstdc++: add ARM SVE support to std::experimental::simd

2024-03-08 Thread Matthias Kretz
Hi, I applied and did extended testing on x86_64 (no regressions) and aarch64 using qemu testing SVE 256, 512, and 1024. Looks good! While going through the applied patch I noticed a few style issues that I simply turned into a patch (attached). A few comments inline. Sorry for not seeing

[PING^2] Re: [PATCH] analyzer: deal with -fshort-enums

2024-03-08 Thread Torbjorn SVENSSON
Ping! Kind regards, Torbjörn On 2024-02-22 09:51, Torbjorn SVENSSON wrote: Ping! Kind regards, Torbjörn On 2024-02-07 17:21, Torbjorn SVENSSON wrote: Hi, Is it okay to backport 3cbab07b08d2f3a3ed34b6ec12e67727c59d285c to releases/gcc-13? Without this backport, I see these failures on

[PATCH] testsuite/108355 - make gcc.dg/tree-ssa/ssa-fre-104.c properly XFAIL

2024-03-08 Thread Richard Biener
The testcase only XFAILs on targets where int has an alignment of sizeof(int). Align the respective array this way to make it XFAIL consistenlty. Tested on x86_64-unknown-linux-gnu and cris-elf. Pushed. PR testsuite/108355 * gcc.dg/tree-ssa/ssa-fre-104.c: Align e. ---

[PATCH] c++: Fix constexpr evaluation of parameters passed by invisible reference [PR111284]

2024-03-08 Thread Jakub Jelinek
Hi! My r9-6136 changes to make a copy of constexpr function bodies before genericization modifies it broke the constant evaluation of non-POD arguments passed by value. In the callers such arguments are passed as reference to usually a TARGET_EXPR, but on the callee side until genericization they

[PATCH] testsuite: Fix up pr113617 test for darwin [PR113617]

2024-03-08 Thread Jakub Jelinek
Hi! The test attempts to link a shared library, and apparently Darwin doesn't allow by default for shared libraries to contain undefined symbols. The following patch just adds dummy definitions for the symbols, so that the library no longer has any undefined symbols at least in my linux testing.

[PATCH] bb-reorder: Fix assertion

2024-03-08 Thread Jakub Jelinek
Hi! When touching bb-reorder yesterday, I've noticed the checking assert doesn't actually check what it meant to. Because asm_noperands returns >= 0 for inline asm patterns (in that case number of input+output+label operands, so asm goto has at least one) and -1 if it isn't inline asm. The

Re: [PATCH] bpf: add size threshold for inlining mem builtins

2024-03-08 Thread Jose E. Marchesi
Hi Faust. > BPF cannot fall back on library calls to implement memmove, memcpy and > memset, so we attempt to expand these inline always if possible. > However, this inline expansion was being attempted even for excessively > large operations, which could result in gcc consuming huge amounts of

[PATCHv2, rs6000] Add subreg patterns for SImode rotate and mask insert

2024-03-08 Thread HAO CHEN GUI
Hi, This patch fixes regression cases in gcc.target/powerpc/rlwimi-2.c. In combine pass, SImode (subreg from DImode) lshiftrt is converted to DImode lshiftrt with an out AND. It matches a DImode rotate and mask insert on rs6000. Trying 2 -> 7: 2: r122:DI=r129:DI REG_DEAD r129:DI

Re: [PATCH] bpf: testsuite: fix unresolved test in memset-1.c

2024-03-08 Thread Jose E. Marchesi
Hi David. OK. Thanks. > The test was trying to do too much by both checking for an error, and > checking the resulting assembly. Of course, due to the error no asm was > produced, so the scan-asm went unresolved. Split it into two separate > tests to fix the issue. > > Tested on