Re: Re: [PATCH] RISC-V: Add Shlcofideleg extension.

2025-06-03 Thread jiawei
> -原始邮件- > 发件人: "Jeff Law" > 发送时间: 2025-06-03 03:37:10 (星期二) > 收件人: Jiawei , gcc-patches@gcc.gnu.org > 抄送: kito.ch...@gmail.com, pal...@rivosinc.com, christoph.muell...@vrull.eu > 主题: Re: [PATCH] RISC-V: Add Shlcofideleg extension. > > > > On 5/27/25 1:32 AM, Jiawei wrote: > > This p

Re: [PATCH] switch-conversion: Mark CSWTCH as mergeable [PR120451]

2025-06-03 Thread Andrew Pinski
On Tue, Jun 3, 2025 at 10:43 PM H.J. Lu wrote: > > On Tue, Jun 3, 2025 at 10:51 AM Andrew Pinski > wrote: > > > > When we have a smallish CSWTCH, it could be placed in the rodata.cst16 > > section so it can be merged with other constants across TUs. > > > > The fix is simple; just mark the decl

Re: [PATCH] switch-conversion: Mark CSWTCH as mergeable [PR120451]

2025-06-03 Thread H.J. Lu
On Tue, Jun 3, 2025 at 10:51 AM Andrew Pinski wrote: > > When we have a smallish CSWTCH, it could be placed in the rodata.cst16 > section so it can be merged with other constants across TUs. > > The fix is simple; just mark the decl as mergable (DECL_MERGEABLE). > DECL_MERGEABLE was added with r14

[PATCH] Use MEM_EXPR only if MEM_P is true

2025-06-03 Thread H.J. Lu
On s390x, for input: (call_insn/u 7 6 11 2 (parallel [ (set (reg:SI 2 %r2) (call (subreg:QI (symbol_ref:SI ("__tls_get_offset") [flags 0x1]) 3) (const_int 0 [0]))) (clobber (reg:SI 14 %r14)) (use (unspec:SI [

Re: [PATCH] Always add REG_CALL_DECL note for CALL

2025-06-03 Thread H.J. Lu
On Tue, Jun 3, 2025 at 11:36 PM Richard Sandiford wrote: > > "H.J. Lu" writes: > > On Tue, Jun 3, 2025 at 6:06 AM H.J. Lu wrote: > >> Always add REG_CALL_DECL note for CALL so that get_call_fndecl works > >> without -fipa-ra. > >> > >> PR other/120494 > >> * calls.cc (expand_call): Always add RE

Re: [PATCH] RISC-V: Support CPUs in -march.

2025-06-03 Thread Fangrui Song
On Tue, Jun 3, 2025 at 12:44 AM Robin Dapp wrote: > > > 1. riscv64-linux-gcc -march=rv64gc -march=foo-cpu -mtune=foo-cpu > > 2. riscv64-linux-gcc -march=rv64gc -march=foo-cpu > > 3. riscv64-linux-gcc -march=rv64gc -march=unset -mtune=unset -mcpu=foo-cpu > > > > Preference to me: > > - Prefer optio

Re: [PATCH v1] RISC-V: Leverage get_vector_binary_rtx_cost to avoid code dup [NFC]

2025-06-03 Thread Kito Cheng
LGTM 於 2025年6月4日 週三,11:23寫道: > From: Pan Li > > Some similar code could be wrapped to func get_vector_binary_rtx_cost, > thus leverage this function to avoid code duplication. > > The below test suites are passed for this patch series. > * The rv64gcv fully regression test. > > gcc/ChangeLog: >

[PATCH v1] RISC-V: Leverage get_vector_binary_rtx_cost to avoid code dup [NFC]

2025-06-03 Thread pan2 . li
From: Pan Li Some similar code could be wrapped to func get_vector_binary_rtx_cost, thus leverage this function to avoid code duplication. The below test suites are passed for this patch series. * The rv64gcv fully regression test. gcc/ChangeLog: * config/riscv/riscv.cc (get_vector_bin

Re: [PATCH] i386: Add more peephole2 for APX NDD

2025-06-03 Thread Hongtao Liu
On Thu, May 29, 2025 at 4:56 PM Hu, Lin1 wrote: > > Hi, > > The patch aims to optimize > movb(%rdi), %al > movq%rdi, %rbx > xorl%esi, %eax, %edx > movb%dl, (%rdi) > cmpb%sil, %al > jne > to > xorb%sil, (%rdi) >

Re: [PATCH] i386: Add more forms peephole2 for adc/sbb

2025-06-03 Thread Hongtao Liu
On Mon, May 26, 2025 at 4:55 PM Hu, Lin1 wrote: > > Hi, all > > Enable -mapxf will change some patterns about adc/sbb. > > Hence gcc will raise an extra mov like > movq8(%rdi), %rax > adcq%rax, 8(%rsi), %rax > movq%rax, 8(%rdi) > rather than > movq

Re: [PATCH V4] RISC-V: Prevent speculative vsetvl insn scheduling

2025-06-03 Thread Vineet Gupta
On 5/21/25 11:07, Jeff Law wrote: > On 5/20/25 4:05 PM, Edwin Lu wrote: >> The instruction scheduler appears to be speculatively hoisting vsetvl >> insns outside of their basic block without checking for data >> dependencies. This resulted in a situation where the following occurs >> >> vs

Re: [PATCH RFA (diagnostic)] c++: modules and #pragma diagnostic

2025-06-03 Thread David Malcolm
On Sat, 2025-05-31 at 23:25 -0400, Jason Merrill wrote: > From f57505c7c6fa05a14e285c14a81021655a43ccbc Mon Sep 17 00:00:00 > 2001 > From: Jason Merrill > Date: Wed, 20 Nov 2024 16:20:52 +0100 > Subject: [PATCH] c++: modules and #pragma diagnostic > To: gcc-patches@gcc.gnu.org > > To respect the

Re: [PATCH] Move get_call_rtx_from to final.c

2025-06-03 Thread Jeff Law
On 6/3/25 4:11 PM, Joseph Myers wrote: On Mon, 2 Jun 2025, Jeff Law wrote: On 6/1/25 1:12 AM, H.J. Lu wrote: Move get_call_rtx_from to final.c and call call_from_call_insn. PR other/120493 * final.cc (call_from_call_insn): Change the argument type to const rtx_call_insn *. (get_call_rtx_fr

Re: [PATCH] Move get_call_rtx_from to final.c

2025-06-03 Thread Joseph Myers
On Mon, 2 Jun 2025, Jeff Law wrote: > On 6/1/25 1:12 AM, H.J. Lu wrote: > > Move get_call_rtx_from to final.c and call call_from_call_insn. > > > > PR other/120493 > > * final.cc (call_from_call_insn): Change the argument type to > > const rtx_call_insn *. > > (get_call_rtx_from): New. > > * rtl.

Re: [PATCH] c++, coroutines: Make analyze_fn_params into a class method.

2025-06-03 Thread Jason Merrill
On 5/29/25 2:30 PM, Iain Sandoe wrote: Tested on x86_64-darwin, powerpc64le-linux, OK for trunk? OK. thanks Iain --- 8< --- This continues code cleanups and migration to encapsulation of the whole coroutine transform. gcc/cp/ChangeLog: * coroutines.cc (analyze_fn_parms): Move from

Re: [Fortran, Patch, PR120483, v2] Fix wrong type of saved allocatable strings.

2025-06-03 Thread Andre Vehreschild
Hi Harald, I don't think it is necessarily the save attribute, but rather it's representation in "assembler". To my understanding the type's size is needed to allocate space in the .RSS or .data segment of the binary. To manage this the size needs to be compile time computable, which it is not

Re: [PATCH] c/c++: Handle '#pragma GCC target optimize' early [PR48026]

2025-06-03 Thread Jason Merrill
On 6/2/25 5:44 PM, Andrew Pinski wrote: From: Gwenole Beauchesne Handle '#pragma GCC optimize' earlier as the __OPTIMIZE__ macro may need to be defined as well for certain usages. Add additional tests for the '#pragma GCC target' case with auto-vectorization enabled and multiple combinations of

Re: [Fortran, Patch, PR120483, v2] Fix wrong type of saved allocatable strings.

2025-06-03 Thread Harald Anlauf
Hi Andre, On 6/3/25 13:31, Andre Vehreschild wrote: Hi all, thanks for the explanations, Christophe. This is very much appreciated. And sorry, I can't follow all presentations, conferences and publications. There is meanwhile way too much for me to process out there. Anyway, the regression I p

Re: [PATCH] Fortran: ICE due to missing locus with data statement for coarray [PR99838]

2025-06-03 Thread Andre Vehreschild
Hi Harald, Lgtm. That patch is nearly obvious. Ok for trunk and backport. Thanks for the patch, Andre Andre Vehreschild * ve...@gmx.de Am 3. Juni 2025 20:43:52 schrieb Harald Anlauf : Dear all, here's a fix for another one of Gerhard's "torture tests" that triggers an ICE with -Warray-tempor

Re: [PATCH] Fortran: ICE due to missing locus with data statement for coarray [PR99838]

2025-06-03 Thread Harald Anlauf
Hi Andre, On 6/3/25 21:03, Andre Vehreschild wrote: Hi Harald, Lgtm. That patch is nearly obvious. Ok for trunk and backport. Thanks for the patch, Andre thanks for the swift review! Pushed as r16-1090-g0768ec0d32f570. Thanks, Harald Andre Vehreschild * ve...@gmx.de Am 3. Juni 2025 20:43

Re: [PATCH] opt: Detect the wrong case of flags option

2025-06-03 Thread Joseph Myers
On Tue, 3 Jun 2025, Andrew Pinski wrote: > This is just a simple check to see if the flags like LangEnabledBy > have the correct case. By putting everything into upper case and > seeing if there is a match (if previously there was not a match). > This would have caught PR 120078 much earlier. > Te

[PATCH] Fortran: ICE due to missing locus with data statement for coarray [PR99838]

2025-06-03 Thread Harald Anlauf
Dear all, here's a fix for another one of Gerhard's "torture tests" that triggers an ICE with -Warray-temporaries. The cause was that the locus was not set for the initializer of the symbol for the testcase. The obvious fix is to then use the locus from the array constructor generated for the d

Re: RISC-V frm mode switching and late_combine2

2025-06-03 Thread Vineet Gupta
On 6/3/25 10:11, Richard Sandiford wrote: > Vineet Gupta writes: >> On 6/3/25 08:24, Richard Sandiford wrote: >>> I think the issue is that: >>> >>> (insn 9 8 27 2 (parallel [ >>> (asm_operands/v ("fsrm %0") ("") 0 [ >>> (reg:SI 15 a5 [139]) >>> ]

[PATCH] opt: Detect the wrong case of flags option

2025-06-03 Thread Andrew Pinski
This is just a simple check to see if the flags like LangEnabledBy have the correct case. By putting everything into upper case and seeing if there is a match (if previously there was not a match). This would have caught PR 120078 much earlier. Tested both with and without the fix for PR 120078. g

Re: [PATCH] c: Enable -Wjump-misses-init for -Wc++-compat

2025-06-03 Thread Martin Uecker
Am Dienstag, dem 03.06.2025 um 11:22 -0700 schrieb Andrew Pinski: > On Tue, Jun 3, 2025 at 11:18 AM Martin Uecker wrote: > > > > Am Dienstag, dem 03.06.2025 um 10:56 -0700 schrieb Andrew Pinski: > > > On Tue, Jun 3, 2025 at 10:45 AM Martin Uecker wrote: > > > > > > > > > > > > This version onl

Re: [PATCH] c: Enable -Wjump-misses-init for -Wc++-compat

2025-06-03 Thread Andrew Pinski
On Tue, Jun 3, 2025 at 11:18 AM Martin Uecker wrote: > > Am Dienstag, dem 03.06.2025 um 10:56 -0700 schrieb Andrew Pinski: > > On Tue, Jun 3, 2025 at 10:45 AM Martin Uecker wrote: > > > > > > > > > This version only contains the fix for -Wc++-compat. > > > > Note this was recorded as PR 120078. I

Re: [PATCH] c: Enable -Wjump-misses-init for -Wc++-compat

2025-06-03 Thread Martin Uecker
Am Dienstag, dem 03.06.2025 um 10:56 -0700 schrieb Andrew Pinski: > On Tue, Jun 3, 2025 at 10:45 AM Martin Uecker wrote: > > > > > > This version only contains the fix for -Wc++-compat. > > Note this was recorded as PR 120078. I didn't notice the typo when I > filed the bug report; otherwise I

Re: [PATCH] c: Enable -Wjump-misses-init for -Wc++-compat

2025-06-03 Thread Andrew Pinski
On Tue, Jun 3, 2025 at 11:06 AM Joseph Myers wrote: > > On Tue, 3 Jun 2025, Martin Uecker wrote: > > > This version only contains the fix for -Wc++-compat. > > > > Bootstrapped and regression tested for x86_64. > > > > Martin > > > > > > c: Enable -Wjump-misses-init for -Wc++-compat > > > >

Re: [PATCH] c: Enable -Wjump-misses-init for -Wc++-compat

2025-06-03 Thread Joseph Myers
On Tue, 3 Jun 2025, Martin Uecker wrote: > This version only contains the fix for -Wc++-compat. > > Bootstrapped and regression tested for x86_64. > > Martin > > > c: Enable -Wjump-misses-init for -Wc++-compat > > Fix a typo that prevented the warning from being activated with >

Re: [PATCH] c++: ICE with unexpanded pack in asm

2025-06-03 Thread Marek Polacek
On Wed, Jun 04, 2025 at 01:28:39AM +0800, yxj-github-437 wrote: > Here an unexpanded parameter pack pass into asm_operand which doesn't > expect to see an operand without type. So use check_for_bare_parameter_packs > to remedy that. > > gcc/cp/ChangeLog: > > * parse.cc (cp_parser_asm_operan

Re: [PATCH] c: Enable -Wjump-misses-init for -Wc++-compat

2025-06-03 Thread Andrew Pinski
On Tue, Jun 3, 2025 at 10:45 AM Martin Uecker wrote: > > > This version only contains the fix for -Wc++-compat. Note this was recorded as PR 120078. I didn't notice the typo when I filed the bug report; otherwise I would have fixed it. Note I think the typo fix is obvious and should be backported

Re: [PATCH] libstdc++: Support _TIME_BITS=64 for system_clock::to_time_t [PR99832]

2025-06-03 Thread Jonathan Wakely
On Tue, 3 Jun 2025, 16:07 Tomasz Kaminski, wrote: > > > On Tue, Jun 3, 2025 at 4:40 PM Jonathan Wakely wrote: > >> On Tue, 3 Jun 2025 at 14:46, Jonathan Wakely wrote: >> > >> > For some 32-bit targets Glibc supports changing the size of time_t to be >> > 64 bits by defining _TIME_BITS=64. That

[PATCH] c: Enable -Wjump-misses-init for -Wc++-compat

2025-06-03 Thread Martin Uecker
This version only contains the fix for -Wc++-compat. Bootstrapped and regression tested for x86_64. Martin c: Enable -Wjump-misses-init for -Wc++-compat Fix a typo that prevented the warning from being activated with -Wc++compat. gcc/c-family/ChangeLog: * c.o

[PATCH] c++: ICE with unexpanded pack in asm

2025-06-03 Thread yxj-github-437
Here an unexpanded parameter pack pass into asm_operand which doesn't expect to see an operand without type. So use check_for_bare_parameter_packs to remedy that. gcc/cp/ChangeLog: * parse.cc (cp_parser_asm_operand_list): Check for unexpanded parameter packs. gcc/testsuite/Change

Re: RISC-V frm mode switching and late_combine2

2025-06-03 Thread Richard Sandiford
Vineet Gupta writes: > On 6/3/25 08:24, Richard Sandiford wrote: >> I think the issue is that: >> >> (insn 9 8 27 2 (parallel [ >> (asm_operands/v ("fsrm %0") ("") 0 [ >> (reg:SI 15 a5 [139]) >> ] >> [ >> (asm_inp

Re: [PATCH v5 0/8] Implement layouts from mdspan.

2025-06-03 Thread Luc Grosheintz
Today I found a file called `gcc/cp/cxxapi-data.csv` that contains # unimplemented ,extents,1,no # unimplemented ,dextents,1,no # unimplemented ,layout_left,1,no # unimplemented ,layout_right,1,no # unimplemented ,layout_stride,1,no # unimplemented ,default_accessor,1,no # unimplemented ,mdspan,1

Re: [PATCH v5 0/8] Implement layouts from mdspan.

2025-06-03 Thread Luc Grosheintz
Thank you Tomasz for the round of review. IIUC we have several cases of if there's a v6, please change this, and no mandatory changes. Would you like me to submit a v6? On 5/30/25 18:42, Luc Grosheintz wrote: The discussion for v4 is here: https://gcc.gnu.org/pipermail/libstdc++/2025-May/061665

Re: [PATCH] c-lex: Handle NULL filenames from UNKNOWN_LOCATION [PR120273].

2025-06-03 Thread Iain Sandoe
> On 3 Jun 2025, at 17:03, Jason Merrill wrote: > > On 5/29/25 8:29 AM, Iain Sandoe wrote: >> To trigger this involves somewhat tortuous pathways through the >> c++ requires code. I did consider the alternative of putting in >> an assert and then checking every call-site, but that seemed to >

Re: [PATCH 3/4] libstdc++: Optimize std::binary_semaphore

2025-06-03 Thread Jonathan Wakely
On Tue, 3 Jun 2025 at 09:46, Jonathan Wakely wrote: > > This adds a new implementation of std::counting_semaphore for the > case where Max == 1, i.e. the std::binary_semaphore typedef. When the > maximum counter value is 1 we don't need to load the current counter > value before doing a compare-exc

Re: RISC-V frm mode switching and late_combine2

2025-06-03 Thread Vineet Gupta
On 6/3/25 08:24, Richard Sandiford wrote: > I think the issue is that: > > (insn 9 8 27 2 (parallel [ > (asm_operands/v ("fsrm %0") ("") 0 [ > (reg:SI 15 a5 [139]) > ] > [ > (asm_input:SI ("r") frm-run-1.c:33) >

[PATCH v3] c++: Fix template class lookup [PR120495, PR115605].

2025-06-03 Thread Iain Sandoe
Hi Jason, >>a bootstrap + testsuite (but without Ada or D). >Hmm, it looks like make_typename_type wants to call lookup_template_class with >a class as CONTEXT. > But it first does the lookup separately. So I read that to indicate this does not need addressing (at this point) - we could exten

[pushed] c++: add -fno-modules to some tests

2025-06-03 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- These tests in the modules/ directory specifically want to test behavior without modules enabled, so let's make that explicit. gcc/testsuite/ChangeLog: * g++.dg/modules/cpp-1.C * g++.dg/modules/cpp-3.C * g++.dg/modu

Re: AArch64 promote aarch64-autovec-peference to mautovec-preference

2025-06-03 Thread Kyrylo Tkachov
> On 3 Jun 2025, at 17:56, Richard Sandiford wrote: > > Tamar Christina writes: >> As requested in my patch for -mmax-vectorization this promotes the parameter >> --param aarch64-autovec-preference to a first class top target flag. >> >> If both the parameter and the flag is specified the par

Re: [PATCH] Always add REG_CALL_DECL note for CALL

2025-06-03 Thread Richard Sandiford
"H.J. Lu" writes: > On Tue, Jun 3, 2025 at 6:06 AM H.J. Lu wrote: >> Always add REG_CALL_DECL note for CALL so that get_call_fndecl works >> without -fipa-ra. >> >> PR other/120494 >> * calls.cc (expand_call): Always add REG_CALL_DECL note. >> (emit_library_call_value_1): Likewise. >> >> Thanks.

Re: [PATCH] c-lex: Handle NULL filenames from UNKNOWN_LOCATION [PR120273].

2025-06-03 Thread Jason Merrill
On 5/29/25 8:29 AM, Iain Sandoe wrote: To trigger this involves somewhat tortuous pathways through the c++ requires code. I did consider the alternative of putting in an assert and then checking every call-site, but that seemed to be a much larger change. tested on x86_64-darwin and powerpc64le-

Re: [PATCH v2 2/2] emit-rtl: Validate mode for paradoxical hardware subregs [PR119966]

2025-06-03 Thread Richard Sandiford
Dimitar Dimitrov writes: > On Thu, May 29, 2025 at 05:59:44PM +0100, Richard Sandiford wrote: >> Sorry for the slow reply. >> >> Dimitar Dimitrov writes: >> > On Fri, May 16, 2025 at 06:14:30PM +0100, Richard Sandiford wrote: >> >> Dimitar Dimitrov writes: > ... >> >> It might still be worth tr

Re: [PATCH] c++, coroutines: Improve diagnostics for awaiter/promise.

2025-06-03 Thread Jason Merrill
On 5/29/25 2:31 PM, Iain Sandoe wrote: Tested on x86_64-darwin, powerpc64le-linux, OK for trunk? thanks Iain --- 8< --- At present, we can issue diagnostics about missing or malformed awaiter or promise methods when we encounter their uses in the body of a users function. We might then re-issu

Re: AArch64 promote aarch64-autovec-peference to mautovec-preference

2025-06-03 Thread Richard Sandiford
Tamar Christina writes: > As requested in my patch for -mmax-vectorization this promotes the parameter > --param aarch64-autovec-preference to a first class top target flag. > > If both the parameter and the flag is specified the parameter takes precedence > with the reasoning that it may already

Re: [PATCH v3 2/2]AArch64: propose -mmax-vectorization as an option to override vector costing

2025-06-03 Thread Andrew Pinski
On Tue, Jun 3, 2025 at 3:07 AM Tamar Christina wrote: > > Hi All, > > With the middle-end providing a way to make vectorization more profitable by > scaling vect-scalar-cost-multiplier this makes a more user friendly option > to make it easier to use. > > I propose making it an actual -m option th

Re: RISC-V frm mode switching and late_combine2

2025-06-03 Thread Richard Sandiford
Vineet Gupta writes: >> ...is from late-combine2, so after RA has completed, whereas the earlier >> dump is from mode switching, so it's hard to tell what late-combine2 is >> operating on. Could you give the RTL as late-combine2 sees it? >> (That would normally be the result of pass_postreload_cs

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-03 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, June 3, 2025 2:12 PM > To: Tamar Christina > Cc: Richard Biener ; Richard Sandiford > ; Pengfei Li ; gcc- > patc...@gcc.gnu.org; ktkac...@nvidia.com > Subject: Re: [PATCH] vect: Improve vectorization for small-trip-count loops

Re: [PATCH] c++, coroutines: Simplify initial_await_resume_called.

2025-06-03 Thread Jason Merrill
On 5/29/25 11:16 AM, Iain Sandoe wrote: Tested on x86_64-darwin, powerpc64le-linux, OK for trunk? OK. thanks Iain --- 8< --- We do not need to generate this code early, since it does not affect any of the analysis. Lowering it later takes less code, and avoids modifying the initial await e

Re: [PATCH] c++, libstdc++: Implement C++26 P3068R5 - constexpr exceptions [PR117785]

2025-06-03 Thread Jason Merrill
On 6/2/25 4:54 AM, Jakub Jelinek wrote: Hi! The following patch implements the C++26 P3068R5 - constexpr exceptions paper. As the IL cxx_eval_constant* functions see already contains the low level calls like __cxa_{allocate,free}_exception, __cxa_{,re}throw etc., the patch just makes 10 extern

Re: [PATCH] libstdc++: Support _TIME_BITS=64 for system_clock::to_time_t [PR99832]

2025-06-03 Thread Tomasz Kaminski
On Tue, Jun 3, 2025 at 4:40 PM Jonathan Wakely wrote: > On Tue, 3 Jun 2025 at 14:46, Jonathan Wakely wrote: > > > > For some 32-bit targets Glibc supports changing the size of time_t to be > > 64 bits by defining _TIME_BITS=64. That causes an ABI change which > > would affect std::chrono::system

[PATCH] Improve create_tmp_reg_or_ssa_name, always create SSA name

2025-06-03 Thread Richard Biener
In GIMPLE we can always use SSA names, so do that as it is cheaper. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. So now we can remove create_tmp_reg_or_ssa_name. Richard. * gimple-fold.cc (create_tmp_reg_or_ssa_name): Always create a SSA name. --- gcc/gimple-fol

Re: [PATCH v2] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-03 Thread Jason Merrill
On 6/3/25 10:02 AM, Iain Sandoe wrote: On 3 Jun 2025, at 02:36, Jason Merrill wrote: On 6/2/25 5:27 PM, Iain Sandoe wrote: On 2 Jun 2025, at 21:17, Jason Merrill wrote: On 6/1/25 3:30 AM, Iain Sandoe wrote: Updated. I realised we no longer need to refer to initial_await_resume_called in

Re: [PATCH] libstdc++: Support _TIME_BITS=64 for system_clock::to_time_t [PR99832]

2025-06-03 Thread Jonathan Wakely
On Tue, 3 Jun 2025 at 14:46, Jonathan Wakely wrote: > > For some 32-bit targets Glibc supports changing the size of time_t to be > 64 bits by defining _TIME_BITS=64. That causes an ABI change which > would affect std::chrono::system_clock::to_time_t. Because to_time_t is > not a function template,

Re: [PATCH] libstdc++: Support _TIME_BITS=64 for system_clock::to_time_t [PR99832]

2025-06-03 Thread Tomasz Kaminski
On Tue, Jun 3, 2025 at 3:46 PM Jonathan Wakely wrote: > For some 32-bit targets Glibc supports changing the size of time_t to be > 64 bits by defining _TIME_BITS=64. That causes an ABI change which > would affect std::chrono::system_clock::to_time_t. Because to_time_t is > not a function template

[PATCH] gcov: Fix gcov_merge when topn present in only one info

2025-06-03 Thread Герасимов Никита Валерьевич
The current implementation of gcov_merge works only when the topn is present in both gcov_info. Otherwise, the function topn_to_memory_representation is not called, and the memory representation remains in a disk-formatted state, which leads to unpredictable behavior in the write_topn_counters func

Re: [PATCH v2 1/1] middle-end: Fix operation_could_trap_p for FIX_TRUNC expressions

2025-06-03 Thread Spencer Abson
On Tue, Jun 03, 2025 at 03:26:40PM +0200, Richard Biener wrote: > On Tue, Jun 3, 2025 at 3:09 PM Spencer Abson wrote: > > > > Floating-point to integer conversions can be inexact or invalid (e.g., due > > to > > overflow or NaN). However, since users of operation_could_trap_p infer the > > bool

[pushed] c++: add operator| for WMB_Flags

2025-06-03 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- There are a lot of uses of | on WMB_Flags, that currently need to then be cast back to WMB_Flags. Let's avoid the need for that. gcc/cp/ChangeLog: * name-lookup.h (operator|, operator|=): Define for WMB_Flags. --- gcc/cp/name-loo

Re: [PATCH v2] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-03 Thread Iain Sandoe
> On 3 Jun 2025, at 02:36, Jason Merrill wrote: > > On 6/2/25 5:27 PM, Iain Sandoe wrote: >>> On 2 Jun 2025, at 21:17, Jason Merrill wrote: >>> >>> On 6/1/25 3:30 AM, Iain Sandoe wrote: Updated. I realised we no longer need to refer to initial_await_resume_called in the ramp at all

[PATCH] libstdc++: Support _TIME_BITS=64 for system_clock::to_time_t [PR99832]

2025-06-03 Thread Jonathan Wakely
For some 32-bit targets Glibc supports changing the size of time_t to be 64 bits by defining _TIME_BITS=64. That causes an ABI change which would affect std::chrono::system_clock::to_time_t. Because to_time_t is not a function template, its mangled name does not depend on the return type, so it has

Re: [PATCH v2] c++: Fix template class lookup [PR120495, PR115605].

2025-06-03 Thread Jason Merrill
On 6/3/25 4:53 AM, Iain Sandoe wrote: gcc/cp/ChangeLog: * pt.cc (lookup_template_class): Honour provided namespace contexts when looking up class templates. This is good, but I'd also expect namespace context to take priority over innermost_non_namespace_value just above? So

Re: [PATCH v2 1/1] middle-end: Fix operation_could_trap_p for FIX_TRUNC expressions

2025-06-03 Thread Richard Biener
On Tue, Jun 3, 2025 at 3:09 PM Spencer Abson wrote: > > Floating-point to integer conversions can be inexact or invalid (e.g., due to > overflow or NaN). However, since users of operation_could_trap_p infer the > bool FP_OPERATION argument from the expression's type, the FIX_TRUNC family > are co

Re: [PATCH v5 8/8] libstdc++: Make layout_left(layout_stride) noexcept.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:48 PM Luc Grosheintz wrote: > [mdspan.layout.left.cons] of N4950 states that this ctor is not > noexcept. Since, all other ctors of layout_left, layout_right or > layout_stride are noexcept, the choice was made, based on > [res.on.exception.handling], to make this ctor n

Re: [PATCH v5 7/8] libstdc++: Add tests for layout_stride.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:44 PM Luc Grosheintz wrote: > Implements the tests for layout_stride and for the features of the other > two layouts that depend on layout_stride. > > libstdc++-v3/ChangeLog: > > * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add > tests f

[PATCH] tree-optimization/120517 - fix dataref group split math

2025-06-03 Thread Richard Biener
DR_INIT is already measured in bytes, so there's no need to multiply the DR_INIT difference of two DRs by the size of one of the DRs when comparing that difference against MAX_BITSIZE_MODE_ANY_MODE. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/120517

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-03 Thread Richard Biener
On Fri, May 9, 2025 at 4:05 PM Tamar Christina wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 9, 2025 2:44 PM > > To: Tamar Christina > > Cc: Richard Sandiford ; Pengfei Li > > ; gcc-patches@gcc.gnu.org; ktkac...@nvidia.com > > Subject: RE: [PATCH] vect: I

Re: [PATCH v5 3/8] libstdc++: Add tests for layout_left.

2025-06-03 Thread Tomasz Kaminski
On Tue, Jun 3, 2025 at 2:50 PM Luc Grosheintz wrote: > > > On 6/3/25 14:31, Tomasz Kaminski wrote: > > On Mon, Jun 2, 2025 at 9:07 AM Luc Grosheintz > > wrote: > > > >> > >> > >> On 5/30/25 18:42, Luc Grosheintz wrote: > >>> Implements a suite of tests for the currently implemented parts of > >>

Re: [PATCH] aarch64:sve: Use create_tmp_reg_or_ssa_name instead of create_tmp_var in the folder

2025-06-03 Thread Richard Biener
On Sun, Jun 1, 2025 at 6:57 PM Andrew Pinski wrote: > > On Sun, Jun 1, 2025 at 3:54 AM Richard Biener > wrote: > > > > On Sat, May 31, 2025 at 8:41 PM Andrew Pinski > > wrote: > > > > > > Currently gimple_folder::convert_and_fold calls create_tmp_var; that > > > means while in ssa form, > > >

Re: [PATCH v5 1/8] libstdc++: Improve naming, whitespace and silence warnings for extents.

2025-06-03 Thread Jonathan Wakely
On Tue, 3 Jun 2025 at 13:08, Tomasz Kaminski wrote: > > > > On Fri, May 30, 2025 at 6:45 PM Luc Grosheintz > wrote: >> >> libstdc++-v3/ChangeLog: >> >> * include/std/mdspan(__mdspan::_ExtentsStorage): Change name >> of private member _M_dynamic_extens to _M_dyn_exts. >> *

[PATCH v2 1/1] middle-end: Fix operation_could_trap_p for FIX_TRUNC expressions

2025-06-03 Thread Spencer Abson
Floating-point to integer conversions can be inexact or invalid (e.g., due to overflow or NaN). However, since users of operation_could_trap_p infer the bool FP_OPERATION argument from the expression's type, the FIX_TRUNC family are considered non-trapping here. This patch handles them explicitly

[PATCH v2 0/1] middle-end: Fix operation_could_trap_p for FIX_TRUNC expressions

2025-06-03 Thread Spencer Abson
Hi, This is a V2 of https://gcc.gnu.org/pipermail/gcc-patches/2025-May/683650.html. Apologies for the delay - I was hesistant to push without preserving sve/pr96357.c and regtesting x86. The change to sve/pr96357.c means that it can still be vectorized, and will still trigger the ICE without Prz

Re: [PATCH v5 2/8] libstdc++: Implement layout_left from mdspan.

2025-06-03 Thread Jonathan Wakely
On Tue, 3 Jun 2025 at 13:13, Tomasz Kaminski wrote: > > > > On Fri, May 30, 2025 at 6:47 PM Luc Grosheintz > wrote: >> >> Implements the parts of layout_left that don't depend on any of the >> other layouts. >> >> libstdc++-v3/ChangeLog: >> >> * include/std/mdspan (layout_left): New clas

Re: [PATCH v5 3/8] libstdc++: Add tests for layout_left.

2025-06-03 Thread Luc Grosheintz
On 6/3/25 14:31, Tomasz Kaminski wrote: On Mon, Jun 2, 2025 at 9:07 AM Luc Grosheintz wrote: On 5/30/25 18:42, Luc Grosheintz wrote: Implements a suite of tests for the currently implemented parts of layout_left. The individual tests are templated over the layout type, to allow reuse as

Re: [PATCH v5 6/8] libstdc++: Implement layout_stride from mdspan.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:47 PM Luc Grosheintz wrote: > Implements the remaining parts of layout_left and layout_right; and all > of layout_stride. > > The implementation of layout_stride::mapping::is_exhaustive applies > the following change to the standard: > > 4266. layout_stride::mapping sh

[PATCH v2] libstdc++: Fix incorrect return values and comments on atomic timed waits

2025-06-03 Thread Jonathan Wakely
The __detail::__wait_until function has a comment that should have been removed when r16-1000-g225622398a9631 changed the return type from a std::pair to a struct with three members. Fix _M_spin_until_impl so that the _M_has_val member of the result is accurate. If the deadline has passed then it

Re: [PATCH v5 5/8] libstdc++: Add tests for layout_right.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:50 PM Luc Grosheintz wrote: > Adds tests for layout_right and for the parts of layout_left that depend > on layout_right. > > libstdc++-v3/ChangeLog: > > * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add > tests for layout_right. >

Re: [PATCH v5 4/8] libstdc++: Implement layout_right from mdspan.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:49 PM Luc Grosheintz wrote: > Implement the parts of layout_left that depend on layout_right; and the > parts of layout_right that don't depend on layout_stride. > > libstdc++-v3/ChangeLog: > > * include/std/mdspan (layout_right): New class. > * src/c++23

Re: [PATCH v5 3/8] libstdc++: Add tests for layout_left.

2025-06-03 Thread Tomasz Kaminski
On Mon, Jun 2, 2025 at 9:07 AM Luc Grosheintz wrote: > > > On 5/30/25 18:42, Luc Grosheintz wrote: > > Implements a suite of tests for the currently implemented parts of > > layout_left. The individual tests are templated over the layout type, to > > allow reuse as more layouts are added. > > > >

Re: [PATCH] libstdc++: Use new __is_destructible built-in in

2025-06-03 Thread Tomasz Kaminski
On Mon, Jun 2, 2025 at 10:56 PM Jonathan Wakely wrote: > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_destructible, is_destructible_v): > Define using new built-in. > (is_nothrow_destructible, is_nothrow_destructible_v): Likewise. > (is_trivially_destr

Re: [PATCH v5 3/8] libstdc++: Add tests for layout_left.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:52 PM Luc Grosheintz wrote: > Implements a suite of tests for the currently implemented parts of > layout_left. The individual tests are templated over the layout type, to > allow reuse as more layouts are added. > > libstdc++-v3/ChangeLog: > > * testsuite/23_con

Re: [PATCH v5 2/8] libstdc++: Implement layout_left from mdspan.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:47 PM Luc Grosheintz wrote: > Implements the parts of layout_left that don't depend on any of the > other layouts. > > libstdc++-v3/ChangeLog: > > * include/std/mdspan (layout_left): New class. > * src/c++23/std.cc.in: Add layout_left. > > Signed-off-by:

Re: [PATCH v5 1/8] libstdc++: Improve naming, whitespace and silence warnings for extents.

2025-06-03 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 6:45 PM Luc Grosheintz wrote: > libstdc++-v3/ChangeLog: > > * include/std/mdspan(__mdspan::_ExtentsStorage): Change name > of private member _M_dynamic_extens to _M_dyn_exts. > * include/std/mdspan(extents): Change name of private member > f

Re: [PATCH 02/14] aarch64: Add support for unpacked SVE FP conversions

2025-06-03 Thread Spencer Abson
Thanks, Alfie. I agree that having a table with just one entry looks a little odd, but the rest of the file follows this pattern. For example: ;; - ;; [FP] Absolute difference ;;

Re: [PATCH] libstdc++: Fix errors in atomic timed waiting functions

2025-06-03 Thread Jonathan Wakely
On Tue, 3 Jun 2025 at 11:04, Tomasz Kaminski wrote: > > > > On Tue, Jun 3, 2025 at 12:02 PM Jonathan Wakely wrote: >> >> On Tue, 3 Jun 2025 at 09:38, Tomasz Kaminski wrote: >> > >> > >> > >> > On Mon, Jun 2, 2025 at 10:59 PM Jonathan Wakely wrote: >> >> >> >> These function templates are apparen

Re: [Patch] libgomp.texi (omp_interop_*): Add note about 5.2-to-6.0 incompatibility

2025-06-03 Thread Tobias Burnus
Hi Sandra, hello world, Sandra Loosemore wrote: On 6/2/25 12:15, Tobias Burnus wrote: The problem is that 'int'/'int*' became 'omp_interop_rc_t ret_code' and 'omp_interop_rc_t *ret_code'. ... I think the patch just confuses readers, as-is.  Plus it has a grammar bug.  How about instead of +

Re: [Fortran, Patch, PR120483, v2] Fix wrong type of saved allocatable strings.

2025-06-03 Thread Andre Vehreschild
Hi all, thanks for the explanations, Christophe. This is very much appreciated. And sorry, I can't follow all presentations, conferences and publications. There is meanwhile way too much for me to process out there. Anyway, the regression I produced in gomp should be fixed by the new version of p

[PATCH v3 2/2]AArch64: propose -mmax-vectorization as an option to override vector costing

2025-06-03 Thread Tamar Christina
Hi All, With the middle-end providing a way to make vectorization more profitable by scaling vect-scalar-cost-multiplier this makes a more user friendly option to make it easier to use. I propose making it an actual -m option that we document and retain vs using the parameter name. In the future

[PATCH] libstdc++: Test for formatting with empty spec for time points.

2025-06-03 Thread Tomasz Kamiński
Adding a tests for behavior of the ostream operator and the formatting with empty chronio-spec for the chrono types. Current coverage is: * time point, zoned_time and local_time_format in this commit, * calendar types in r16-1016-g28a17985dd34b7. libstdc++-v3/ChangeLog: * testsuite/std/

Ping^4: [PATCH v4] get source line for diagnostic from preprocessed file [PR preprocessor/79106]

2025-06-03 Thread Bader, Lucas
Gentle ping for https://gcc.gnu.org/pipermail/gcc-patches/2025-March/676875.html

Re: [PATCH v1 0/4] RISC-V: Combine vec_duplicate + vdiv.vv to vdiv.vx on GR2VR cost

2025-06-03 Thread Robin Dapp
This patch would like to introduce the combine of vec_dup + vdiv.vv into vdiv.vx on the cost value of GR2VR. The late-combine will take place if the cost of GR2VR is zero, or reject the combine if non-zero like 1, 15 in test. There will be two cases for the combine: The series is OK, thanks.

[PATCH v2] libstdc++: Fix errors in atomic timed waiting functions

2025-06-03 Thread Jonathan Wakely
These function templates are apparently never used or instantiated, because they don't compile. This fixes them, but they're still unused. I plan to make use of them in a later commit. In __atomic_wait_address_until_v, the &__args should have bee changed to just __args by r16-988-g219bb905a60d95,

[committed] libstdc++: Check feature test macro for jthread in

2025-06-03 Thread Jonathan Wakely
Check the appropriate feature test macro instead of checking that __cplusplus >= 201703L. libstdc++-v3/ChangeLog: * include/std/stop_token: Check __glibcxx_jthread instead of __cplusplus. --- Tested x86_64-linux. Pushed to trunk. libstdc++-v3/include/std/stop_token | 7 +++

Re: [PATCH] libstdc++: Use new __is_destructible built-in in

2025-06-03 Thread Jonathan Wakely
On Tue, 3 Jun 2025 at 10:54, Tomasz Kaminski wrote: > > > > On Mon, Jun 2, 2025 at 10:56 PM Jonathan Wakely wrote: >> >> libstdc++-v3/ChangeLog: >> >> * include/std/type_traits (is_destructible, is_destructible_v): >> Define using new built-in. >> (is_nothrow_destructible,

[PATCH 1/2]AArch64 docs: add itemx for outline-atomics docs

2025-06-03 Thread Tamar Christina
The documentation for outline atomics is missing the entry for -mno-outline-atomics which this patch adds. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * doc/extend.texi (outline-atomics): Document the inverse -mno flag. -

[committed] libstdc++: Fix errors and incorrect returns in atomic timed waits

2025-06-03 Thread Jonathan Wakely
The __detail::__wait_until function has a comment that should have been removed when r16-1000-g225622398a9631 changed the return type from a std::pair to a struct with three members. The __atomic_wait_address_until_v and __atomic_wait_address_for_v function templates are apparently never used or i

Re: [PATCH] libstdc++: Fix incorrect comments on atomic timed waits

2025-06-03 Thread Tomasz Kaminski
With the change to the title, this looks good to me. On Tue, Jun 3, 2025 at 12:02 PM Tomasz Kaminski wrote: > The tile says that you are doing only comment fixes, while there is code > change > in __spin_until_impl. Could you please adjust it: > Fix incorrect returns and comments on atomic timed

Re: [PATCH] libstdc++: Fix errors in atomic timed waiting functions

2025-06-03 Thread Tomasz Kaminski
On Tue, Jun 3, 2025 at 12:02 PM Jonathan Wakely wrote: > On Tue, 3 Jun 2025 at 09:38, Tomasz Kaminski wrote: > > > > > > > > On Mon, Jun 2, 2025 at 10:59 PM Jonathan Wakely > wrote: > >> > >> These function templates are apparently never used or instantiated, > >> because they don't compile. Thi

  1   2   >