Re: [PATCH] Refactor msse4 and mno-sse4.

2025-04-24 Thread Uros Bizjak
On Fri, Apr 25, 2025 at 8:14 AM liuhongt wrote: > > This is originally from [1] > > For the command line, or target attribute, the actual operation goes > into ix86_handle_option, and as long as we get it right in this > ix86_handle_option, everything else should be fine. > As for the

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Jan Hubicka
> > And thus it may be more RTL friendly to represent it this way instead of > > current unspec called UNSPEC_IEEE_MAX... > > There's a patch proposed for that [1], and Jakub has some comments. > > Jakub Jelinek 于2024年11月15日周五 16:20写道: > > > > On Fri, Nov 15, 2024 at 04:04:55PM +0800, Hongyu Wan

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Jan Hubicka
> Note for blendv, it checks the significant bit of the mask, not simple > if_then_else > mask > if_true > if_false > > It should be > if_then_else >ashiftrt mask 31 >if_true >if_false I think canonical form (produced by combine) would be if_then_else ge mask 0 if_false

[PATCH] Refactor msse4 and mno-sse4.

2025-04-24 Thread liuhongt
This is originally from [1] For the command line, or target attribute, the actual operation goes into ix86_handle_option, and as long as we get it right in this ix86_handle_option, everything else should be fine. As for the macros generated by the mask name (TARGET_SSE4_1_P), their mea

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Hongtao Liu
On Fri, Apr 25, 2025 at 1:26 PM Jan Hubicka wrote: > > > On Thu, Apr 24, 2025 at 6:27 PM Jan Hubicka wrote: > > > > > > > Since ix86_expand_sse_movcc will simplify them into a simple vmov, vpand > > > > or vpandn. > > > > Current register_operand/vector_operand could lose some optimization > > >

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Jan Hubicka
> On Thu, Apr 24, 2025 at 6:27 PM Jan Hubicka wrote: > > > > > Since ix86_expand_sse_movcc will simplify them into a simple vmov, vpand > > > or vpandn. > > > Current register_operand/vector_operand could lose some optimization > > > opportunity. > > > > > > Bootstrapped and regtested on x86_64-pc

[RFC] RISC-V: Implment H modifier for printing the next register name

2025-04-24 Thread Jin Ma
For RV32 inline assembly, when handling 64-bit integer data, it is often necessary to process the lower and upper 32 bits separately. Unfortunately, we can only output the current register name (lower 32 bits) but not the next register name (upper 32 bits). To address this, the modifier 'H' has be

Re: [v2 PATCH 1/2] RISC-V: Support RISC-V Profiles 20/22.

2025-04-24 Thread Jeff Law
On 1/20/25 8:59 PM, Jiawei wrote: This patch introduces support for RISC-V Profiles RV20 and RV22 [1], enabling developers to utilize these profiles through the -march option. [1] https://github.com/riscv/riscv-profiles/releases/tag/v1.0 Version log: Using lowercase letters to present Profil

Re: [PATCH] RISC-V: Imply C from Zca whenever possible [PR119122]

2025-04-24 Thread Jeff Law
On 3/5/25 5:05 AM, Yuriy Kolerov wrote: GCC must imply C extension from Zca extension when it's possible. It's necessary for achieving compatibility between different march strings which in fact may be the same. E.g., if rv32ic multilib configuration is presented in GCC, then GCC will not cho

RE: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Liu, Hongtao
> -Original Message- > From: Jan Hubicka > Sent: Friday, April 25, 2025 12:27 AM > To: Liu, Hongtao > Cc: gcc-patches@gcc.gnu.org; crazy...@gmail.com; hjl.to...@gmail.com > Subject: Re: [PATCH] Accept allones or 0 operand for vcond_mask op1. > > > Since ix86_expand_sse_movcc will simp

Re: [PATCH v2] libstdc++: Add lvalue overload for generator::yield_value

2025-04-24 Thread Arsen Arsenović
Jonathan Wakely writes: > This was approved in Wrocław as LWG 3899. > > This avoids creating a new coroutine frame to co_yield the elements of > an lvalue generator. > > libstdc++-v3/ChangeLog: > > * include/std/generator (generator::yield_value): Add overload > taking lvalue element_

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Kees Cook
On April 24, 2025 1:44:23 PM PDT, Qing Zhao wrote: > > >> On Apr 24, 2025, at 15:43, Bill Wendling wrote: >> >> On Thu, Apr 24, 2025 at 8:15 AM Qing Zhao wrote: >>> >>> Hi, >>> >>> Kees reported a segmentation failure when he used the patch to compiler >>> kernel, >>> and the reduced the

[PATCH] gimple-verifier: Add check that comparison in GIMPLE_COND does not throw

2025-04-24 Thread Andrew Pinski
While working on PR 119903, I noticed that there is code in replace_stmt_with_simplification which makes sure that the comparison of a GIMPLE_COND does not throw (non-call exceptions and trapping math) but the gimple verifier does not verify this. So let's add it. Bootstrapped and tested on x86_6

[PATCH 1/2] libstdc++: Add _M_key_compare helper to associative containers

2025-04-24 Thread Jonathan Wakely
In r10-452-ge625ccc21a91f3 I noted that we don't have an accessor for invoking _M_impl._M_key_compare in the associative containers. That meant that the static assertions to check for valid comparison functions were squirrelled away in _Rb_tree::_S_key instead. As Jason noted in https://gcc.gnu.org

[PATCH 2/2] libstdc++: Improve diagnostics for std::packaged_task invocable checks

2025-04-24 Thread Jonathan Wakely
Moving the static_assert that checks is_invocable_r_v into _Task_state means it is checked when we instantiate that class template. Replacing the __create_task_state function with a static member function _Task_state::_S_create ensures we instantiate _Task_state and trigger the static_assert immed

[committed] libstdc++: Remove unnecessary dg-prune-output from tests

2025-04-24 Thread Jonathan Wakely
There are no errors matching this pattern in these tests (only in the deque/48101_neg.cc and vector/48101_neg.cc tests). libstdc++-v3/ChangeLog: * testsuite/23_containers/forward_list/48101_neg.cc: Remove dg-prune-output that doesn't match anything. * testsuite/23_containe

Re: [PATCH] testsuite: Add require target for SJLJ exception implementation

2025-04-24 Thread Jeff Law
On 4/24/25 12:22 PM, Dimitar Dimitrov wrote: Testcases for musttail call optimization fail on pru-unknown-elf: FAIL: c-c++-common/musttail14.c -std=gnu++17 (test for excess errors) Excess errors: .../gcc/gcc/testsuite/c-c++-common/musttail14.c:37:14: error: cannot tail-call: caller

Re: [PATCH] testsuite: Skip tests incompatible with generic thunk support

2025-04-24 Thread Bernhard Reutner-Fischer
>> * lib/target-supports.exp >> (check_effective_target_variadic_mi_thunk): New function. >OK. >jeff > Please document new effective_target checks in sourcebuild.texi thanks

Re: [PATCH] Fortran: fix procedure pointer handling with -fcheck=pointer [PR102900]

2025-04-24 Thread Jerry D
On 4/24/25 12:59 PM, Harald Anlauf wrote: Dear all, the attached patch is the result of my attempts to fix an ICE when compiling gfortran.dg/proc_ptr_52.f90 with -fcheck=all.  While trying to reduce this, I found several oddities with functions returning class(*), pointer that ICE'd too. The or

[committed] cobol: Repair some exception processing logic.

2025-04-24 Thread Robert Dubner
>From 5faa0313bd82827f86768553932d55f7b2bc05a2 Mon Sep 17 00:00:00 2001 From: Robert Dubner Date: Thu, 24 Apr 2025 16:26:58 -0400 Subject: [PATCH] cobol: Repair some exception processing logic. This patch changes the exception processing logic for the calculation of reference modifications and ta

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Qing Zhao
> On Apr 24, 2025, at 15:43, Bill Wendling wrote: > > On Thu, Apr 24, 2025 at 8:15 AM Qing Zhao wrote: >> >> Hi, >> >> Kees reported a segmentation failure when he used the patch to compiler >> kernel, >> and the reduced the testing case is something like the following: >> >> struct f { >>

Re: [PATCH 1/3][GCC16-Stage-1] RISC-V: Combine vec_duplicate + vadd.vv to vadd.vx on GR2VR cost

2025-04-24 Thread Jeff Law
On 4/18/25 9:28 AM, Li, Pan2 wrote: Thanks Jeff for comments. So we've got 3 patches all touching on the same basic area, so we need to be careful about staging in. Agree, thanks Jeff for paying attention. So don't be surprised if most review time is focused on how the costing model work

Re: [PATCH 0/2] Improve b4 workflow

2025-04-24 Thread Jiaxun Yang
在2025年1月2日周四 下午11:07,Jiaxun Yang写道: > Hi all, > > This series improved b4 working flow by wire up code style > and changelog checking scripts in b4's automation. > > Please help with review and apply. Ping on this? Thanks! > > Thanks! > > Signed-off-by: Jiaxun Yang > --- > Jiaxun Yang (2): >

Re: [PATCH] RISC-V: Add tt-ascalon-d8 integer and floating point scheduling model

2025-04-24 Thread Jeff Law
On 4/24/25 2:37 AM, Anton Blanchard wrote: Add integer and floating point scheduling models for the Tenstorrent Ascalon 8 wide CPU. gcc/ChangeLog: * config/riscv/riscv-cores.def (RISCV_TUNE): Update. * config/riscv/riscv-opts.h (enum riscv_microarchitecture_type): Ad

[PATCH] Fortran: fix procedure pointer handling with -fcheck=pointer [PR102900]

2025-04-24 Thread Harald Anlauf
Dear all, the attached patch is the result of my attempts to fix an ICE when compiling gfortran.dg/proc_ptr_52.f90 with -fcheck=all. While trying to reduce this, I found several oddities with functions returning class(*), pointer that ICE'd too. The original ICE in the PR turned out to be a bug

Re: [PATCH v2 3/3] RISC-V: Add testcases for vec_duplicate + vadd.vv combine to vadd.vx

2025-04-24 Thread Jeff Law
On 4/19/25 5:24 AM, pan2...@intel.com wrote: From: Pan Li Add asm dump check and run test for vec_duplicate + vadd.vv combine to vadd.vx. Introduce new folder to hold all related testcases. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/testsuite

Re: [PATCH v2 2/3] RISC-V: Adjust the testcases after vec_duplicate + vadd.vv combine

2025-04-24 Thread Jeff Law
On 4/19/25 5:24 AM, pan2...@intel.com wrote: From: Pan Li After we support the vec_duplicate + vadd.vv combine to vadd.vx, the existing testcases need some adjust for asm dump check times. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/testsuite/C

Re: [PATCH] testsuite: Skip tests incompatible with generic thunk support

2025-04-24 Thread Jeff Law
On 4/24/25 12:23 PM, Dimitar Dimitrov wrote: Some backends do not define TARGET_ASM_OUTPUT_MI_THUNK. But the generic thunk support cannot emit code for calling variadic methods of multiple-inheritance classes. Example error for pru-unknown-elf: .../gcc/gcc/testsuite/g++.dg/ipa/pr83549.C:7

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Bill Wendling
On Thu, Apr 24, 2025 at 8:15 AM Qing Zhao wrote: > > Hi, > > Kees reported a segmentation failure when he used the patch to compiler > kernel, > and the reduced the testing case is something like the following: > > struct f { > void *g __attribute__((__counted_by__(h))); > long h; > }; > > exte

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Qing Zhao
> On Apr 24, 2025, at 14:31, Kees Cook wrote: > > On Thu, Apr 24, 2025 at 06:06:03PM +, Qing Zhao wrote: >> >> >>> On Apr 24, 2025, at 13:07, Kees Cook wrote: >>> >>> On Thu, Apr 24, 2025 at 04:36:14PM +, Qing Zhao wrote: > On Apr 24, 2025, at 11:59, Martin Uecker wrote:

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Kees Cook
On Thu, Apr 24, 2025 at 06:06:03PM +, Qing Zhao wrote: > > > > On Apr 24, 2025, at 13:07, Kees Cook wrote: > > > > On Thu, Apr 24, 2025 at 04:36:14PM +, Qing Zhao wrote: > >> > >>> On Apr 24, 2025, at 11:59, Martin Uecker wrote: > >>> > >>> Am Donnerstag, dem 24.04.2025 um 15:15 +000

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Uros Bizjak
On Thu, Apr 24, 2025 at 8:10 PM Uros Bizjak wrote: > > On Thu, Apr 24, 2025 at 6:27 PM Jan Hubicka wrote: > > > > > Since ix86_expand_sse_movcc will simplify them into a simple vmov, vpand > > > or vpandn. > > > Current register_operand/vector_operand could lose some optimization > > > opportunit

[PATCH] testsuite: Skip tests incompatible with generic thunk support

2025-04-24 Thread Dimitar Dimitrov
Some backends do not define TARGET_ASM_OUTPUT_MI_THUNK. But the generic thunk support cannot emit code for calling variadic methods of multiple-inheritance classes. Example error for pru-unknown-elf: .../gcc/gcc/testsuite/g++.dg/ipa/pr83549.C:7:24: error: generic thunk code fails for method 'v

[PATCH] testsuite: Add require target for SJLJ exception implementation

2025-04-24 Thread Dimitar Dimitrov
Testcases for musttail call optimization fail on pru-unknown-elf: FAIL: c-c++-common/musttail14.c -std=gnu++17 (test for excess errors) Excess errors: .../gcc/gcc/testsuite/c-c++-common/musttail14.c:37:14: error: cannot tail-call: caller uses sjlj exceptions Silence these errors by disabli

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Uros Bizjak
On Thu, Apr 24, 2025 at 6:27 PM Jan Hubicka wrote: > > > Since ix86_expand_sse_movcc will simplify them into a simple vmov, vpand > > or vpandn. > > Current register_operand/vector_operand could lose some optimization > > opportunity. > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Qing Zhao
> On Apr 24, 2025, at 13:07, Kees Cook wrote: > > On Thu, Apr 24, 2025 at 04:36:14PM +, Qing Zhao wrote: >> >>> On Apr 24, 2025, at 11:59, Martin Uecker wrote: >>> >>> Am Donnerstag, dem 24.04.2025 um 15:15 + schrieb Qing Zhao: Hi, Kees reported a segmentation failur

Re: [PATCH 1/2] arc: Add commutative multiplication patterns.

2025-04-24 Thread Claudiu Zissulescu Ianculescu
Hi Jeff, Indeed, Luis should have been using "umulti". The other attributes are not required. I'll fix it before pushing to the mainline. Thanks, Claudiu On Fri, Apr 18, 2025 at 8:41 PM Jeff Law wrote: > > > > On 3/18/25 10:22 AM, Luis Silva wrote: > > This patch introduces two new instruction

Fwd: [PATCH 2/2] arc: Use intrinsics for __builtin_mul_overflow ()

2025-04-24 Thread Claudiu Zissulescu Ianculescu
Adding missing email addresses. -- Forwarded message - From: Claudiu Zissulescu Ianculescu Date: Thu, Apr 24, 2025 at 8:48 PM Subject: Re: [PATCH 2/2] arc: Use intrinsics for __builtin_mul_overflow () To: Jeff Law Hi Jeff, The other attributes are not required as the pattern d

Re: [PATCH] arc: testsuite: Scan "rlc" instead of "mov.hs".

2025-04-24 Thread Claudiu Zissulescu Ianculescu
Hi Jeff, There is one patch missing, I'll add it to mainline as soon as the main is open for commits. Best, Claudiu On Fri, Apr 18, 2025 at 12:10 AM Jeff Law wrote: > > > > On 3/18/25 10:23 AM, Luis Silva wrote: > > Due to the patch by Roger Sayle, > > 09881218137f4af9b7c894c2d350cf2ff8e0ee23,

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Kees Cook
On Thu, Apr 24, 2025 at 04:36:14PM +, Qing Zhao wrote: > > > On Apr 24, 2025, at 11:59, Martin Uecker wrote: > > > > Am Donnerstag, dem 24.04.2025 um 15:15 + schrieb Qing Zhao: > >> Hi, > >> > >> Kees reported a segmentation failure when he used the patch to compiler > >> kernel, > >

Fix ICE building deepsjeng with -fprofile-use

2025-04-24 Thread Jan Hubicka
Hi, the problem here is division by zero, since adjusted 0 > precise 0. Fixed by using right test. gcc/ChangeLog: PR ipa/119924 * ipa-cp.cc (update_counts_for_self_gen_clones): Use nonzero_p. (update_profiling_info): Likewise. (update_specialized_profile): Likewise

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Qing Zhao
> On Apr 24, 2025, at 11:59, Martin Uecker wrote: > > Am Donnerstag, dem 24.04.2025 um 15:15 + schrieb Qing Zhao: >> Hi, >> >> Kees reported a segmentation failure when he used the patch to compiler >> kernel, >> and the reduced the testing case is something like the following: >> >> s

[committed] libgomp/testsuite: Fix hip_header_nvidia check, add workaround to test

2025-04-24 Thread Tobias Burnus
This is a follow up to my previous commit - now trying more seriously using the real HIP (not some own wrapper) with Nvidia. Well, that failed first due to some deprecation warning, which could be silenced. And then due to errors which seem to be bugs in the HIP implementation for Nvidia/CUDA. I

Re: [PATCH] c: Allow $@` in GNU23/GNU2Y raw string delimiters [PR110343]

2025-04-24 Thread Marek Polacek
On Wed, Apr 16, 2025 at 09:25:00PM +0200, Jakub Jelinek wrote: > Hi! > > Aaron mentioned in the PR that late in C23 N3124 was adopted and > $@` are now part of basic character set. The paper has been implemented > in GCC from what I can see, but we should allow for GNU23/2Y $@` in > raw string de

Re: [PATCH] Accept allones or 0 operand for vcond_mask op1.

2025-04-24 Thread Jan Hubicka
> Since ix86_expand_sse_movcc will simplify them into a simple vmov, vpand > or vpandn. > Current register_operand/vector_operand could lose some optimization > opportunity. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? > > gcc/ChangeLog: > > * config/i386/p

Re: [PATCH RFC] c++: bad pending_template recursion

2025-04-24 Thread Jonathan Wakely
On Fri, 18 Apr 2025 at 23:08, Jason Merrill wrote: > > limit_bad_template_recursion currently avoids immediate instantiation of > templates from uses in an already ill-formed instantiation, but we still can > get unnecessary recursive instantiation in pending_templates if the > instantiation was q

Re: [PATCH] c++: Fix OpenMP support with C++20 modules [PR119864]

2025-04-24 Thread Jason Merrill
On 4/22/25 4:48 PM, Jason Merrill wrote: On 4/22/25 1:21 PM, Tobias Burnus wrote: Jason Merrill wrote: On 4/22/25 11:04 AM, Tobias Burnus wrote: The question is why does this code trigger at all, given that there is OpenMP but no offload code at all? And how to fix it in case there is offload

[pushed] c++: attribute duplication [PR116954]

2025-04-24 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- As a followup to the previous patch for 116954, there's no reason to do anything in remove_contract_attributes if contracts aren't enabled. PR c++/116954 gcc/cp/ChangeLog: * contracts.cc (remove_contract_attributes): Retur

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Martin Uecker
Am Donnerstag, dem 24.04.2025 um 15:15 + schrieb Qing Zhao: > Hi, > > Kees reported a segmentation failure when he used the patch to compiler > kernel, > and the reduced the testing case is something like the following: > > struct f { > void *g __attribute__((__counted_by__(h))); > long

Re: Improve vectorizer costs of min, max, abs, absu and const_expr on x86

2025-04-24 Thread Jan Hubicka
Hi, > With this patch > https://gcc.gnu.org/pipermail/gcc-patches/2025-April/681503.html > scalar version can also be optimized to vcmpnltsd + vpandn this is nice. Would be nice if this was also caught by combiner... > > Can we also check if_true/if_false, if they're const0, or > > constm1(inte

Re: [GCC16 stage 1][PATCH v2 0/3] extend "counted_by" attribute to pointer fields of structures

2025-04-24 Thread Qing Zhao
Hi, Kees reported a segmentation failure when he used the patch to compiler kernel, and the reduced the testing case is something like the following: struct f { void *g __attribute__((__counted_by__(h))); long h; }; extern struct f *my_alloc (int); int i(void) { struct f *iov = my_alloc (1

Re: [PATCH v2] Document AArch64 changes for GCC 15

2025-04-24 Thread Kyrylo Tkachov
> On 23 Apr 2025, at 13:47, Richard Sandiford wrote: > > Thanks for all the feedback. I've tried to address it in the version > below. I'll push later today if there are no further comments. > > Richard > > > The list is structured as: > > - new configurations > - command-line changes > -

Re: [PATCH v2] libstdc++: Add lvalue overload for generator::yield_value

2025-04-24 Thread Tomasz Kaminski
On Thu, Apr 24, 2025 at 2:41 PM Jonathan Wakely wrote: > This was approved in Wrocław as LWG 3899. > > This avoids creating a new coroutine frame to co_yield the elements of > an lvalue generator. > > libstdc++-v3/ChangeLog: > > * include/std/generator (generator::yield_value): Add overlo

Re: [PATCH] s390, v2: Allow 5+ argument tail-calls in some special cases [PR119873]

2025-04-24 Thread Stefan Schulze Frielinghaus
On Thu, Apr 24, 2025 at 12:49:39PM +0200, Jakub Jelinek wrote: > On Thu, Apr 24, 2025 at 09:44:45AM +0200, Stefan Schulze Frielinghaus wrote: > > Yes, every parameter is sign or zero extended if its type is smaller > > than 64bit. > > > Note, on s390 a parameter is either passed in a register (pai

Re: [PATCH] libstdc++: hashing support for chrono value classes (P2592R2)

2025-04-24 Thread Tomasz Kaminski
Hi, I am reattaching the original patch below, as I wasn't on the mailing list when it was sent. Thank you for submitting the patch and apologies for the late response. The major comment I have is that these are new C++26 classes, so we can use requires __is_hash_enabled_for<_Tp> and define only

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Kyrylo Tkachov
> On 24 Apr 2025, at 14:44, Jakub Jelinek wrote: > > On Thu, Apr 24, 2025 at 12:39:59PM +, Kyrylo Tkachov wrote: >>> The third case looks undesirable, -fno-ipa-reorder-for-locality is the >>> default and shouldn't affect anything, whether explicit or implicit. >> >> I see. With this patch

[PATCH v2] libstdc++: Add lvalue overload for generator::yield_value

2025-04-24 Thread Jonathan Wakely
This was approved in Wrocław as LWG 3899. This avoids creating a new coroutine frame to co_yield the elements of an lvalue generator. libstdc++-v3/ChangeLog: * include/std/generator (generator::yield_value): Add overload taking lvalue element_of view, as per LWG 3899. * t

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Jakub Jelinek
On Thu, Apr 24, 2025 at 12:39:59PM +, Kyrylo Tkachov wrote: > > The third case looks undesirable, -fno-ipa-reorder-for-locality is the > > default and shouldn't affect anything, whether explicit or implicit. > > I see. With this patch I don’t get a complaint on > -flto-partition=balanced -fno

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Kyrylo Tkachov
> On 24 Apr 2025, at 14:28, Jakub Jelinek wrote: > > On Thu, Apr 24, 2025 at 12:05:06PM +, Kyrylo Tkachov wrote: > On 24 Apr 2025, at 12:09, Jakub Jelinek wrote: > > On Thu, Apr 24, 2025 at 09:54:09AM +, Kyrylo Tkachov wrote: >>> I'd have expected instead of the LTO_PA

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Jakub Jelinek
On Thu, Apr 24, 2025 at 12:05:06PM +, Kyrylo Tkachov wrote: > >>> On 24 Apr 2025, at 12:09, Jakub Jelinek wrote: > >>> > >>> On Thu, Apr 24, 2025 at 09:54:09AM +, Kyrylo Tkachov wrote: > > I'd have expected instead of the LTO_PARTITION_DEFAULT checks one > > should be > > tes

Re: [PATCH v2 1/3] RISC-V: Combine vec_duplicate + vadd.vv to vadd.vx on GR2VR cost

2025-04-24 Thread Robin Dapp
Ah, I see, thanks. So vec_dup costs 1 + 2 and vadd.vv costs 1 totalling 4 while vadd.vx costs 1 + 2, making it cheaper? Yes, looks we need to just assign the GR2VR when vec_dup. I also tried diff cost here to see the impact to late-combine. + if (rcode == VEC_DUPLICATE && SCALAR_INT_MODE_P (

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Kyrylo Tkachov
> On 24 Apr 2025, at 12:18, Jakub Jelinek wrote: > > On Thu, Apr 24, 2025 at 10:15:08AM +, Kyrylo Tkachov wrote: >> >> >>> On 24 Apr 2025, at 12:09, Jakub Jelinek wrote: >>> >>> On Thu, Apr 24, 2025 at 09:54:09AM +, Kyrylo Tkachov wrote: > I'd have expected instead of the LTO_PA

[Patch] libgomp: Add additional OpenMP interop runtime tests

2025-04-24 Thread Tobias Burnus
The attached patch adds a bunch of tests for OpenMP's interop; namely: * One test checks whether nowait/depend works * The rest checks that the returns cuda/cuda_driver and hip objects work. * This requires that he CUDA and HIP runtimes are found, best also the header files and/or hipfort For

[PATCH] libstdc++: Constrain formatter for thread:id [PR119918]

2025-04-24 Thread Tomasz Kamiński
This patch add constrains __formatter::__char to _CharT type parameter of formatter specialization, matching the constrains of formatting of integer/pointers that are used as native handles. The dependency on header, is changed to . To achieve that, formatting of pointers is extraced from void co

[PATCH] s390, v2: Allow 5+ argument tail-calls in some special cases [PR119873]

2025-04-24 Thread Jakub Jelinek
On Thu, Apr 24, 2025 at 09:44:45AM +0200, Stefan Schulze Frielinghaus wrote: > Yes, every parameter is sign or zero extended if its type is smaller > than 64bit. > Note, on s390 a parameter is either passed in a register (pair) or via > memory, but not partly in a register and memory. Ok, so like

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Jakub Jelinek
On Thu, Apr 24, 2025 at 09:54:09AM +, Kyrylo Tkachov wrote: > > I'd have expected instead of the LTO_PARTITION_DEFAULT checks one should be > > testing !opts_set->x_flag_lto_partition (i.e. -flto-partition=balanced > > should be the default, but when not specified explicitly, it would really >

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Jakub Jelinek
On Thu, Apr 24, 2025 at 10:15:08AM +, Kyrylo Tkachov wrote: > > > > On 24 Apr 2025, at 12:09, Jakub Jelinek wrote: > > > > On Thu, Apr 24, 2025 at 09:54:09AM +, Kyrylo Tkachov wrote: > >>> I'd have expected instead of the LTO_PARTITION_DEFAULT checks one should > >>> be > >>> testing !

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Kyrylo Tkachov
> On 24 Apr 2025, at 12:09, Jakub Jelinek wrote: > > On Thu, Apr 24, 2025 at 09:54:09AM +, Kyrylo Tkachov wrote: >>> I'd have expected instead of the LTO_PARTITION_DEFAULT checks one should be >>> testing !opts_set->x_flag_lto_partition (i.e. -flto-partition=balanced >>> should be the defau

Re: [PATCH] libstdc++: centralize and improve testing of shared_ptr/weak_ptr conversions

2025-04-24 Thread Jonathan Wakely
On Sat, 15 Mar 2025 at 20:02, Giuseppe D'Angelo wrote: > > Hi, > > The attached patch is a cleanup and improvement of a test that I've > added in r15-8048-gdf0e6509bf7442. Since the test is identical for > shared_ptr and weak_ptr, I've centralized it to reduce future > maintenance, and extended it

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Kyrylo Tkachov
> On 24 Apr 2025, at 11:34, Jakub Jelinek wrote: > > On Thu, Apr 24, 2025 at 11:27:36AM +0200, Jakub Jelinek wrote: >>> This is a thinko in the logic for handling the default -flto-partition= >>> arguments. We should override it to balanced only if it stayed as default >>> up to that point. We

Re: [PATCH] Add std::deque shrink_to_fit test

2025-04-24 Thread Jonathan Wakely
On Wed, 23 Apr 2025 at 21:10, François Dumont wrote: > AFAICT I've never got proper validation for this small patch. > > Is it ok to commit ? > Yes, OK for trunk, thanks. > Thanks > > > On 14/04/2025 22:25, François Dumont wrote: > > > On 14/04/2025 08:29, Tomasz Kaminski wrote: > > > > On Su

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Jakub Jelinek
On Thu, Apr 24, 2025 at 11:27:36AM +0200, Jakub Jelinek wrote: > > This is a thinko in the logic for handling the default -flto-partition= > > arguments. We should override it to balanced only if it stayed as default > > up to that point. We should also be testing opts instead of opts_set here. > >

Re: [PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Jakub Jelinek
On Thu, Apr 24, 2025 at 09:10:37AM +, Kyrylo Tkachov wrote: > [resending to the list, I think there might have been an error with the > previous message] > > Hi all, > > This is a thinko in the logic for handling the default -flto-partition= > arguments. We should override it to balanced onl

[PATCH] opts.cc Fix thinko with default handling of -flto-partition=

2025-04-24 Thread Kyrylo Tkachov
[resending to the list, I think there might have been an error with the previous message] Hi all, This is a thinko in the logic for handling the default -flto-partition= arguments. We should override it to balanced only if it stayed as default up to that point. We should also be testing opts ins

Re: [PATCH] GCN, nvptx offloading: Host/device compatibility: Itanium C++ ABI, DSO Object Destruction API [PR119853, PR119854]

2025-04-24 Thread Andrew Stubbs
On 23/04/2025 20:49, Thomas Schwinge wrote: '__dso_handle' for '__cxa_atexit', '__cxa_finalize'. See . PR target/119853 PR target/119854 libgcc/ * config/gcn/crt0.c (_fini_array): Call '__GCC_of

[PATCH] RISC-V: Add tt-ascalon-d8 integer and floating point scheduling model

2025-04-24 Thread Anton Blanchard
Add integer and floating point scheduling models for the Tenstorrent Ascalon 8 wide CPU. gcc/ChangeLog: * config/riscv/riscv-cores.def (RISCV_TUNE): Update. * config/riscv/riscv-opts.h (enum riscv_microarchitecture_type): Add tt_ascalon_d8. * config/riscv/riscv.md

[PATCH] tailc: Improve tail recursion handling [PR119493]

2025-04-24 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 11:51:49AM +0200, Jakub Jelinek wrote: > Here it is, ok if it passes bootstrap/regtest? I'll queue the interdiff > between this patch and the previous one for GCC 16. Here is the interdiff to improve the tail recursion handling also for non-musttail calls. Bootstrapped/re

Re: [PATCH] Introduce -flto-partition=locality

2025-04-24 Thread Kyrylo Tkachov
> On 24 Apr 2025, at 09:17, Feng Xue OS wrote: > >> validate_ipa_reorder_locality_lto_partition (opts, opts_set); > > I know this patch has already been merged into the trunk. But I think the > below piece of code change in opts.cc is questionable, it would completely > override any user-spe

[PATCH] Fix size_t in id-15.c and infoleak-net-ethtool-ioctl.c for llp64

2025-04-24 Thread Jonathan Yong
Attached patch OK for master branch? Will push soon if there are no objections. gcc/testsuite/ChangeLog: * gcc.dg/graphite/id-15.c: Use __SIZE_TYPE__ instead of unsigned long. * gcc.dg/plugin/infoleak-net-ethtool-ioctl.c: ditto.From 7b1176589124eb25bf23ec0c05faa947aaabf

[PATCH] c, c++: Extend -Wunused-but-set-* warnings [PR44677]

2025-04-24 Thread Jakub Jelinek
Hi! The -Wunused-but-set-* warnings work by using 2 bits on VAR_DECLs & PARM_DECLs, TREE_USED and DECL_READ_P. If neither is set, we typically emit -Wunused-variable or -Wunused-parameter warning, that is for variables which are just declared (including initializer) and completely unused. If TREE

Re: [PATCH] s390: Allow 5+ argument tail-calls in some special cases [PR119873]

2025-04-24 Thread Stefan Schulze Frielinghaus
On Wed, Apr 23, 2025 at 04:46:17PM +0200, Jakub Jelinek wrote: [...] > > > It won't really work at -O0 but should work for -O1 and above, at least > > > when > > > one doesn't really try to modify the parameter conditionally and hope it > > > will > > > be optimized away in the end. > > > > It a

Re: [PATCH] Introduce -flto-partition=locality

2025-04-24 Thread Feng Xue OS
> validate_ipa_reorder_locality_lto_partition (opts, opts_set); I know this patch has already been merged into the trunk. But I think the below piece of code change in opts.cc is questionable, it would completely override any user-specified partition model, suppose that user wants a traditional