Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Richard Biener
On Thu, 21 Aug 2025, Kees Cook wrote: > On Thu, Aug 21, 2025 at 01:01:37PM +0200, Richard Biener wrote: > > On Thu, 21 Aug 2025, Peter Zijlstra wrote: > > > > > On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > > > > > > > > +/* Compute KCFI type ID for a function declaration or f

Re: [PATCH v2] Use x86 GFNI for vectorized constant byte shifts/rotates

2025-08-21 Thread Hongtao Liu
On Wed, Aug 20, 2025 at 11:08 PM Andi Kleen wrote: > > From: Andi Kleen > > [v2 version: Split rotate patterns in V16QI and V32/64QI. > Add various AVX512F checks. Remove some unnecessary > masks. Add untested cond_ pattern (untested, couldn't trigger it) > Clean up some control flow. Use narrowe

Re: [PATCH] gcov: Split atomic bitwise-or for some targets

2025-08-21 Thread Sebastian Huber
- Am 15. Aug 2025 um 2:33 schrieb Sebastian Huber sebastian.hu...@embedded-brains.de: > - Am 15. Aug 2025 um 0:02 schrieb Jeff Law jeffreya...@gmail.com: > >> On 8/13/25 9:00 PM, Sebastian Huber wrote: >>> Hello Jeff, >>> >>> thanks for your comment. >>> >>> - Am 10. Jul 2025 um 16

Re: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Kyrylo Tkachov
Hi Richard, > On 21 Aug 2025, at 08:54, Richard Sandiford > wrote: > > Today is my last working day at Arm, so this patch switches my > MAINTAINERS entries to my personal email address. (It turns out > that I never updated some of the later entries...oops) > > In order to avoid setting false

[PATCH] c++/modules: Provide definitions of synthesized methods outside their defining module [PR120499]

2025-08-21 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- In the PR, we're getting a linker error from _Vector_impl's destructor never getting emitted. This is because of a combination of factors: 1. in imp-member-4_a, the destructor is not used and so there is no definition

[PATCH] RISC-V: Add tt-ascalon-d8 pipeline description

2025-08-21 Thread Anton Blanchard
Add pipeline description 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: Update tune attribute

Re: [PATCH] libatomic: Provide __atomic_test_and_set() alias

2025-08-21 Thread Sebastian Huber
- Am 14. Aug 2025 um 3:47 schrieb Sebastian Huber sebastian.hu...@embedded-brains.de: > - Am 10. Jul 2025 um 8:54 schrieb Sebastian Huber > sebastian.hu...@embedded-brains.de: > >> If the target does not support the atomic_flag_test_and_set() operation in >> hardware, the compiler emits

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Andrew Pinski
On Thu, Aug 21, 2025 at 10:11 PM Kees Cook wrote: > > On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > > On Thu, Aug 21, 2025 at 12:47 AM Kees Cook wrote: > > > +struct kcfi_target_hooks { > > > + /* Apply architecture-specific masking to type ID. */ > > > + uint32_t (*mask_typ

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Kees Cook
On Thu, Aug 21, 2025 at 06:09:08PM +, Qing Zhao wrote: > > On Aug 21, 2025, at 10:25, Peter Zijlstra wrote: > > > > On Thu, Aug 21, 2025 at 01:01:37PM +0200, Richard Biener wrote: > >> On Thu, 21 Aug 2025, Peter Zijlstra wrote: > >> > >>> On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pins

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Kees Cook
On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > On Thu, Aug 21, 2025 at 12:47 AM Kees Cook wrote: > > +struct kcfi_target_hooks { > > + /* Apply architecture-specific masking to type ID. */ > > + uint32_t (*mask_type_id) (uint32_t type_id); > > + > > + /* Generate bundled KCFI

[PATCH] libstdc++: Remove tai_- and gps_clock::now impls from ABI (RHEL-105230)

2025-08-21 Thread Nathan Myers
This moves std::tai_clock::now() and std::tai_clock::now() definitions from header inlines to static members invoked via a normal function call, in service of stabilizing the C++20 ABI. It marks tai_clock and gps_clock "is_steady = true", as they are not subject to adjudicated discontinuities, unl

RE: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Li, Pan2
Hi Richard S, It is difficult to say more, thank you for the help in passed years. Best wishes and break a leg! Pan -Original Message- From: Qing Zhao Sent: Friday, August 22, 2025 2:38 AM To: rdsandif...@googlemail.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] MAINTAINERS: Upda

[PATCH] [arm] require armv7 support for [PR120424]

2025-08-21 Thread Alexandre Oliva
On Aug 20, 2025, "Richard Earnshaw (lists)" wrote: > On 19/06/2025 14:25, Alexandre Oliva wrote: >> On Jun 19, 2025, Alexandre Oliva wrote: >> +v7 "-march=armv7" __ARM_ARCH_7__ > Similarly to the line directly below, this needs to be 'armv7+fp', > otherwise this won't work on targets that

RE: [PATCH v1 4/4] RISC-V: Adjust the asm check after enable vmacc.vx combine

2025-08-21 Thread Li, Pan2
Emm, seems this adjustment is not that correct, let me revisit and send v2 if possible. Pan -Original Message- From: Li, Pan2 Sent: Tuesday, August 19, 2025 11:10 AM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp@gmail.com;

[PATCH] config: Remove unused autoconf files

2025-08-21 Thread Pietro Monteiro
Both GCC and binutils/gdb trees do not use any of the macros defined in these files. Removing them from both trees and regenerating the build scripts results in no diff. The files ax_lib_socket_nsl.m4 and uintmax_t.m4 aren't in the binutils/gdb tree. I did some digging with git and it seems ax_l

Re: [PATCH v9 00/13] C/C++: FMV refactor, C FMV support and ACLE compliance

2025-08-21 Thread Alfie Richards
On 21/08/2025 18:45, Jeff Law wrote: On 8/19/25 2:43 AM, Alfie Richards wrote: Hi All, Resending due to some email issues resulting in undelivered email. Thank you so much for the reviews. This revision is mostly addressing feedback from Richard S. Changes since V8: - Several stylistic chan

Re: [Fortran/121627]: Fix NULL pointer issue

2025-08-21 Thread Jerry D
Done. commit 2c1fd2fdb3029fdd3ea3f88fe635f37b3a5fae36 (HEAD -> master, origin/master, origin/HEAD) Author: Steven G. Kargl Date: Thu Aug 21 14:31:16 2025 -0700 Fortran: Fix NULL pointer issue. PR fortran/121627 gcc/fortran/ChangeLog: * module.cc (create_in

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-21 Thread Kees Cook
On Thu, Aug 21, 2025 at 07:14:31PM +, Qing Zhao wrote: > > > > On Aug 21, 2025, at 12:16, Kees Cook wrote: > > > > > >>> + else if (TREE_CODE (fntype_or_fndecl) == FUNCTION_DECL) > >>> +{ > >>> + tree fndecl = fntype_or_fndecl; > >>> + tree base_fntype = TREE_TYPE (fndecl);

Re: [Fortran/121627]: Fix NULL pointer issue

2025-08-21 Thread Steve Kargl
On Thu, Aug 21, 2025 at 01:42:47PM -0700, Jerry D wrote: > On 8/21/25 12:32 PM, Steve Kargl wrote: > > fortran/121627 found an issue with a NULL pointer dereference > > when the name of the main program conflicts with a symbol in > > iso_fortran_env. The following patch fixes the issue. While > >

Re: [PATCH v8 1/6] c-family: add btf_type_tag and btf_decl_tag attributes

2025-08-21 Thread Joseph Myers
On Thu, 21 Aug 2025, David Faust wrote: > Hi Joseph, > > On 8/20/25 15:49, Joseph Myers wrote: > > On Tue, 12 Aug 2025, David Faust wrote: > > > >> + if (TREE_CODE (*node) == FUNCTION_TYPE || TREE_CODE (*node) == > >> METHOD_TYPE) > >> +{ > >> + /* Treat btf_type_tag applied to a func

Re: [PATCH v9 06/13] c/c++: Add target_[version/clones] to decl diagnostics formatting.

2025-08-21 Thread Alfie Richards
On 19/08/2025 19:06, Jason Merrill wrote: On 8/19/25 4:49 AM, Alfie Richards wrote: Adds the target_version and target_clones attributes to diagnostic messages for target_version semantics. This is because the target_version/target_clones attributes affect the identity of the decls, so need

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

2025-08-21 Thread Jeff Law
On 8/21/25 11:42 AM, Robin Dapp wrote: This patch would like to introduce the combine of vec_dup + vmacc.vv into vmacc.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, 2, 15 in test. LGTM, thanks. I was j

Re: [Fortran/121627]: Fix NULL pointer issue

2025-08-21 Thread Jerry D
On 8/21/25 12:32 PM, Steve Kargl wrote: fortran/121627 found an issue with a NULL pointer dereference when the name of the main program conflicts with a symbol in iso_fortran_env. The following patch fixes the issue. While here I've expanded the error message to hopefully explain the issue. 2

Re: [PATCH v8 1/6] c-family: add btf_type_tag and btf_decl_tag attributes

2025-08-21 Thread David Faust
Hi Joseph, On 8/20/25 15:49, Joseph Myers wrote: > On Tue, 12 Aug 2025, David Faust wrote: > >> + if (TREE_CODE (*node) == FUNCTION_TYPE || TREE_CODE (*node) == >> METHOD_TYPE) >> +{ >> + /* Treat btf_type_tag applied to a function type as applying to the >> + return type instead.

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Kees Cook
On Thu, Aug 21, 2025 at 01:01:37PM +0200, Richard Biener wrote: > On Thu, 21 Aug 2025, Peter Zijlstra wrote: > > > On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > > > > > > +/* Compute KCFI type ID for a function declaration or function type > > > > (internal) */ > > > > +static

[PATCH] libstdc++: Specialize _Never_valueless_alt for jthread, stop_token and stop_source

2025-08-21 Thread Tomasz Kamiński
The move constructors for stop_source and stop_token are equivalent to copying and clearing the raw pointer, as they are wrappers for a counted-shared state. For jthread, the move constructor performs a member-wise move of stop_source and thread. While std::thread could also have a _Never_valueles

[Fortran/121627]: Fix NULL pointer issue

2025-08-21 Thread Steve Kargl
fortran/121627 found an issue with a NULL pointer dereference when the name of the main program conflicts with a symbol in iso_fortran_env. The following patch fixes the issue. While here I've expanded the error message to hopefully explain the issue. 2025-08-21 Steven G. Kargl PR fo

[PATCH v2] preprocessor: More escapes for Makefile rules (-M option) [PR41329, PR121450]

2025-08-21 Thread Joerg Boehmer
This patch adds support for more characters that are special to GNU make in file-names. Especially GNU make expects in rules that #, %, :, *, ? and [ characters are preceded by a backslash to remove their special meaning. PR preprocessor/41329 PR preprocessor/121450 libcpp/Change

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-21 Thread Qing Zhao
> On Aug 21, 2025, at 12:16, Kees Cook wrote: > > >>> + else if (TREE_CODE (fntype_or_fndecl) == FUNCTION_DECL) >>> +{ >>> + tree fndecl = fntype_or_fndecl; >>> + tree base_fntype = TREE_TYPE (fndecl); >>> + >>> + /* For FUNCTION_DECL, build a synthetic function type using

Re: [PATCH v3 2/2] libgcc: Dont use TARGET_SYSTEM_ROOT from gcc

2025-08-21 Thread John Ericson
On Wed, Jul 30, 2025, at 5:52 PM, Joseph Myers wrote: > OK in the absence of AIX maintainer objections within the next week. Checking in on a few of these (this will be one of a few emails). I believe it is has been a few weeks of no objections now? John

Re: [PATCH v4] Move NO_PIE_CFLAGS logic from gcc to libgcc

2025-08-21 Thread John Ericson
On Thu, Jul 31, 2025, at 6:03 PM, Joseph Myers wrote: > OK in the absence of libgcc or build machinery maintainer objections > within the next week. Checking in on a few of these (this will be one of a few emails). I believe it is has been a few weeks of no objections now? John

[committed 0/3] pru: Add support for cores present in AM1808 SoC

2025-08-21 Thread Dimitar Dimitrov
The AM1808 SoC from Texas Instruments contains an older version of the PRU core, which is missing the XIN, XOUT and LOOP instructions. Thus it does not support the pseudo-instructions FILL and ZERO, and also hardware multiplication. This patch series adds flags to optionally disable those missing

Re: [PATCH v4] Factor out thread model detection with new `GCC_AC_THREAD_MODEL` macro

2025-08-21 Thread John Ericson
On Thu, Jul 31, 2025, at 6:08 PM, Joseph Myers wrote: > OK in the absence of build machinery maintainer objections within the next > week. Checking in on a few of these (this will be one of a few emails). I believe it is has been a few weeks of no objections now? John

Re: [RFC PATCH 4/7] x86: Add x86_64 Kernel Control Flow Integrity implementation

2025-08-21 Thread Kees Cook
On Thu, Aug 21, 2025 at 11:46:17AM -0700, Kees Cook wrote: > On Thu, Aug 21, 2025 at 11:29:35AM +0200, Peter Zijlstra wrote: > > On Thu, Aug 21, 2025 at 12:26:37AM -0700, Kees Cook wrote: > > > Build and run tested on x86_64 Linux kernel with various CPU errata > > > handling alternatives and FineI

[committed 1/3] pru: Add options to disable MUL/FILL/ZERO instructions

2025-08-21 Thread Dimitar Dimitrov
Older PRU core versions (e.g. in AM1808 SoC) do not support XIN, XOUT, FILL, ZERO instructions. Add GCC command line options to optionally disable generation of those instructions, so that code can be executed on such older PRU cores. gcc/ChangeLog: * common/config/pru/pru-common.cc (TAR

[committed 3/3] pru: libgcc: Add software implementation for multiplication

2025-08-21 Thread Dimitar Dimitrov
For cores without a hardware multiplier, set respective optabs with library functions which use software implementation of multiplication. The implementation was copied from the RL78 backend. gcc/ChangeLog: * config/pru/pru.cc (pru_init_libfuncs): Set softmpy libgcc functions for

[committed 2/3] pru: Define multilib for different core variants

2025-08-21 Thread Dimitar Dimitrov
Enable multilib builds for contemporary PRU core versions (AM335x and later), and older versions present in AM18xx. gcc/ChangeLog: * config.gcc: Include pru/t-multilib. * config/pru/pru.h (MULTILIB_DEFAULTS): Define. * config/pru/t-multilib: New file. Signed-off-by: Dimit

Re: [RFC PATCH 4/7] x86: Add x86_64 Kernel Control Flow Integrity implementation

2025-08-21 Thread Kees Cook
On Thu, Aug 21, 2025 at 11:29:35AM +0200, Peter Zijlstra wrote: > On Thu, Aug 21, 2025 at 12:26:37AM -0700, Kees Cook wrote: > > Implement x86_64-specific KCFI backend: > > > > - Function preamble generation with type IDs positioned at -(4+prefix_nops) > > offset from function entry point. > >

Re: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Qing Zhao
Richard, I always remember your help on my first GCC securty feature. At that time, I was just a new comer to the GCC community. Without your patience and time, I cannot finish that first project. Hope everything is smooth in your new life journey. Qing > On Aug 21, 2025, at 13:52, Andrew P

Re: [PATCH] strlen: Don't do the malloc+memset->calloc optimization in some cases [PR83022]

2025-08-21 Thread Andrew Pinski
On Tue, Jul 22, 2025 at 7:16 PM Andrew Pinski wrote: > > On Fri, Apr 18, 2025 at 5:08 PM Andrew Pinski > wrote: > > > > This fixes a long standing (since GCC 5) issue where the > > malloc+memset->calloc > > optimization would happen even if the memset was not always executed. > > This is a vari

Re: [PATCH] c: Add folding of nullptr_t in some cases [PR121478]

2025-08-21 Thread Joseph Myers
On Thu, 21 Aug 2025, Andrew Pinski wrote: > The middle-end does not fully understand NULLPTR_TYPE. So it > gets confused a lot of the time when dealing with it. > This adds the folding that is similarly done in the C++ front-end already. > In some cases it should produce slightly better code as th

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Qing Zhao
> On Aug 21, 2025, at 10:25, Peter Zijlstra wrote: > > On Thu, Aug 21, 2025 at 01:01:37PM +0200, Richard Biener wrote: >> On Thu, 21 Aug 2025, Peter Zijlstra wrote: >> >>> On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: >>> > +/* Compute KCFI type ID for a function declarat

Re: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Claudiu Zissulescu Ianculescu
Hi Richard, On Thu, Aug 21, 2025 at 9:55 AM Richard Sandiford wrote: > > Today is my last working day at Arm, so this patch switches my > MAINTAINERS entries to my personal email address. (It turns out > that I never updated some of the later entries...oops) I am sorry to hear that ... > > In

[pushed] c++: constexpr clobber of const [PR121068]

2025-08-21 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Since r16-3022, 20_util/variant/102912.cc was failing in C++20 and above due to wrong errors about destruction modifying a const object; destruction is OK. PR c++/121068 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_store_exp

Re: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Andrew Pinski
On Wed, Aug 20, 2025 at 11:55 PM Richard Sandiford wrote: > > Today is my last working day at Arm, so this patch switches my > MAINTAINERS entries to my personal email address. (It turns out > that I never updated some of the later entries...oops) > > In order to avoid setting false expectations,

Re: [PATCH] RISC-V: testsuite: Fix DejaGnu support for riscv_zvfh

2025-08-21 Thread Jeff Law
On 8/20/25 7:36 AM, Paul-Antoine Arras wrote: Call check_effective_target_riscv_zvfh_ok rather than check_effective_target_riscv_zvfh in vx_vf_*run-1-f16.c run tests and ensure that they are actually run. Also fix remove_options_for_riscv_zvfh. gcc/testsuite/ChangeLog: * gcc.target/r

Re: [PATCH v9 00/13] C/C++: FMV refactor, C FMV support and ACLE compliance

2025-08-21 Thread Jeff Law
On 8/19/25 2:43 AM, Alfie Richards wrote: Hi All, Resending due to some email issues resulting in undelivered email. Thank you so much for the reviews. This revision is mostly addressing feedback from Richard S. Changes since V8: - Several stylistic changes/code clarity. - Change check_targ

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

2025-08-21 Thread Robin Dapp
This patch would like to introduce the combine of vec_dup + vmacc.vv into vmacc.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, 2, 15 in test. LGTM, thanks. -- Regards Robin

Re: [PATCH] RISC-V: Replace deprecated FUNCTION_VALUE/LIBCALL_VALUE macros with target hooks

2025-08-21 Thread Jeff Law
On 8/18/25 7:42 AM, Kito Cheng wrote: The FUNCTION_VALUE and LIBCALL_VALUE macros are deprecated in favor of the TARGET_FUNCTION_VALUE and TARGET_LIBCALL_VALUE target hooks. This patch replaces the macro definitions with proper target hook implementations. This change is also a preparatory s

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-21 Thread Andrew Pinski
On Thu, Aug 21, 2025 at 9:16 AM Kees Cook wrote: > > On Thu, Aug 21, 2025 at 12:59:06AM -0700, Andrew Pinski wrote: > > On Thu, Aug 21, 2025 at 12:41 AM Kees Cook wrote: > > > > > To support the KCFI type-id which needs to convert unique function > > > prototypes into unique 32-bit values, add a

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-21 Thread Kees Cook
On Thu, Aug 21, 2025 at 12:59:06AM -0700, Andrew Pinski wrote: > On Thu, Aug 21, 2025 at 12:41 AM Kees Cook wrote: > > > To support the KCFI type-id which needs to convert unique function > > prototypes into unique 32-bit values, add a subset of the Itanium C++ > > mangling ABI for C typeinfo of

Re: [PATCH] rtl-ssa: Add missing live-out uses [PR121619]

2025-08-21 Thread Richard Sandiford
Richard Biener writes: >> Am 21.08.2025 um 16:56 schrieb Richard Sandiford : >> >> This PR is another bug in the rtl-ssa code to manage live-out uses. >> It seems that this didn't get much coverage until recently. >> >> In the testcase, late-combine first removed a register-to-register >> move

Re: [PATCH] rtl-ssa: Add missing live-out uses [PR121619]

2025-08-21 Thread Richard Biener
> Am 21.08.2025 um 16:56 schrieb Richard Sandiford : > > This PR is another bug in the rtl-ssa code to manage live-out uses. > It seems that this didn't get much coverage until recently. > > In the testcase, late-combine first removed a register-to-register > move by substituting into all use

[PATCH] rtl-ssa: Add missing live-out uses [PR121619]

2025-08-21 Thread Richard Sandiford
This PR is another bug in the rtl-ssa code to manage live-out uses. It seems that this didn't get much coverage until recently. In the testcase, late-combine first removed a register-to-register move by substituting into all uses, some of which were in other EBBs. This was done after checking make

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Peter Zijlstra
On Thu, Aug 21, 2025 at 01:01:37PM +0200, Richard Biener wrote: > On Thu, 21 Aug 2025, Peter Zijlstra wrote: > > > On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > > > > > > +/* Compute KCFI type ID for a function declaration or function type > > > > (internal) */ > > > > +static

Re: [PATCH] RISC-V: testsuite: Fix DejaGnu support for riscv_zvfh

2025-08-21 Thread Robin Dapp
OK. -- Regards Robin

Re: [PR119702][PATCH] rs6000: Use vector add when left shifting by 1

2025-08-21 Thread Avinash Jayakar
On Thu, 2025-08-14 at 11:27 +0530, Avinash Jayakar wrote: > PR119702 Ping 1. Request review of this patch. Thanks and regards, Avinash

Re: [PATCH] RISC-V: Expand const_vector with 2 elts per pattern.

2025-08-21 Thread Robin Dapp
This is the one git was complaining about on your end? b4 gets it for me via b4 shazam https://inbox.sourceware.org/gcc-patches/dbtiy6uch8xb.3522x0caqi...@gmail.com/ it's a little mangled: the "Hi," is in there, and there's two different line-breaking lengths. So maybe something's odd wi

Re: [PATCH] Mark , constexpr

2025-08-21 Thread Jonathan Wakely
On Thu, 21 Aug 2025 at 12:46, Tomasz Kaminski wrote: > > > > On Mon, Aug 11, 2025 at 3:22 PM Thor Preimesberger > wrote: >> >> libstdc++: Mark , constexpr. >> >> This patch makes partial progress towards P3372 by marking >> std::{deque, priority_queue, queue} and relevant internal helpers to be

RE: [PATCH 1/5]middle-end: Add scaffolding to support narrowing IFNs

2025-08-21 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Thursday, August 21, 2025 1:17 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; rdsandif...@googlemail.com; nd > Subject: RE: [PATCH 1/5]middle-end: Add scaffolding to support narrowing IFNs > > On Thu, 21 Aug 2025, Tamar Christ

RE: [PATCH v2 1/2] Match: Add form 3 for unsigned SAT_MUL

2025-08-21 Thread Li, Pan2
Thanks Richard, will commit the series if no comments for the second test only patch in next 24 hours. Pan -Original Message- From: Richard Biener Sent: Tuesday, August 19, 2025 2:56 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@

Re: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Jeff Law
On 8/21/25 3:47 AM, Richard Earnshaw (lists) wrote: On 21/08/2025 07:54, Richard Sandiford wrote: Today is my last working day at Arm, so this patch switches my MAINTAINERS entries to my personal email address. (It turns out that I never updated some of the later entries...oops) In order to

[PATCH 1/2]rs6000: Disable vector constant splitters on POWER9/10 [PR118480]

2025-08-21 Thread jeevitha
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. Disable easy_vector_constant_msb and easy_vector_constant_add_self splitters on POWER10. On POWER9, bypass these splitters when xxspltib can directly generate 8-bit signed constants, for avoiding redundant va

RE: [PATCH 1/5]middle-end: Add scaffolding to support narrowing IFNs

2025-08-21 Thread Richard Biener
On Thu, 21 Aug 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Thursday, August 21, 2025 11:51 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; rdsandif...@googlemail.com; nd > > Subject: RE: [PATCH 1/5]middle-end: Add scaffolding to sup

Re: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Ramana Radhakrishnan
On Thu, Aug 21, 2025 at 3:18 PM Richard Earnshaw (lists) wrote: > > On 21/08/2025 07:54, Richard Sandiford wrote: > > Today is my last working day at Arm, so this patch switches my > > MAINTAINERS entries to my personal email address. (It turns out > > that I never updated some of the later entri

[PATCH v2] match.pd: Fold pattern of round semantics.

2025-08-21 Thread Zhou Zhao
This patch is a respond of the patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673051.html as some suggestion by Richard Biener, I have adopted these suggestions and regenerated the patch. In the 538.imagick_r benchmark of Spec2017, I find these pattern from MagickRound func

[PATCH] tree-optimization/111494 - reduction vectorization with signed UB

2025-08-21 Thread Richard Biener
The following makes sure to pun arithmetic that's used in vectorized reduction to unsigned when overflow invokes undefined behavior. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. I will rely on this with improving SLP reduction chain handling for signed integer chains where reassoc

RE: [PATCH 2/5]middle-end: Add detection for add halfing and narrowing instruction

2025-08-21 Thread Richard Biener
On Thu, 21 Aug 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Thursday, August 21, 2025 11:55 AM > > To: Tamar Christina > > Cc: Richard Biener ; gcc-patches@gcc.gnu.org; nd > > > > Subject: RE: [PATCH 2/5]middle-end: Add detection for add halfing

RE: [PATCH 2/5]middle-end: Add detection for add halfing and narrowing instruction

2025-08-21 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Thursday, August 21, 2025 11:55 AM > To: Tamar Christina > Cc: Richard Biener ; gcc-patches@gcc.gnu.org; nd > > Subject: RE: [PATCH 2/5]middle-end: Add detection for add halfing and > narrowing > instruction > > On Wed, 20 Aug 2025, T

RE: [PATCH 1/5]middle-end: Add scaffolding to support narrowing IFNs

2025-08-21 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Thursday, August 21, 2025 11:51 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; rdsandif...@googlemail.com; nd > Subject: RE: [PATCH 1/5]middle-end: Add scaffolding to support narrowing IFNs > > On Wed, 20 Aug 2025, Tamar Chris

Re: [PATCH] match.pd: Fold (C << x) == x -> 0

2025-08-21 Thread Richard Biener
On Thu, 21 Aug 2025, dhr...@nvidia.com wrote: > From: Dhruv Chawla > > Bootstrapped and regtested on aarch64-linux-gnu. > > Signed-off-by: Dhruv Chawla > > gcc/ChangeLog: > > * match.pd: New pattern. > > gcc/testsuite/ChangeLog: > > * gcc.dg/match-constant-shift-1.c: New test.

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Richard Biener
On Thu, 21 Aug 2025, Peter Zijlstra wrote: > On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > > > > +/* Compute KCFI type ID for a function declaration or function type > > > (internal) */ > > > +static uint32_t > > > +compute_kcfi_type_id (tree fntype_or_fndecl) > > > +{ > > > +

Re: [PATCH 2/2]AArch64: extend cost model to cost outer loop vect where the inner loop is invariant [PR121290]

2025-08-21 Thread Richard Sandiford
Tamar Christina writes: > Consider the example: > > void > f (int *restrict x, int *restrict y, int *restrict z, int n) > { > for (int i = 0; i < 4; ++i) > { > int res = 0; > for (int j = 0; j < 100; ++j) > res += y[j] * z[i]; > x[i] = res; > } > } > > we curren

RE: [PATCH 2/5]middle-end: Add detection for add halfing and narrowing instruction

2025-08-21 Thread Richard Biener
On Wed, 20 Aug 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Wednesday, August 20, 2025 1:48 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; rguent...@suse.de > > Subject: Re: [PATCH 2/5]middle-end: Add detection for add halfing a

[PATCH] match.pd: Fold (C << x) == x -> 0

2025-08-21 Thread dhruvc
From: Dhruv Chawla Bootstrapped and regtested on aarch64-linux-gnu. Signed-off-by: Dhruv Chawla gcc/ChangeLog: * match.pd: New pattern. gcc/testsuite/ChangeLog: * gcc.dg/match-constant-shift-1.c: New test. * gcc.dg/match-constant-shift-1.c: Likewise. --- gcc/match.p

RE: [PATCH 1/5]middle-end: Add scaffolding to support narrowing IFNs

2025-08-21 Thread Richard Biener
On Wed, 20 Aug 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Wednesday, August 20, 2025 1:48 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; rdsandif...@googlemail.com; nd > > Subject: Re: [PATCH 1/5]middle-end: Add scaffolding to sup

RE: [PATCH 2/2]AArch64: extend cost model to cost outer loop vect where the inner loop is invariant [PR121290]

2025-08-21 Thread Tamar Christina
In case there's any confusion, this patch is technically independent of the first one. Just sent together because I noticed the first one while fixing this. So this still needs a review regardless of patch 1. Tamar > -Original Message- > From: Tamar Christina > Sent: Wednesday, August

[commmitted v6 2/2] libstdc++: Implement aligned_accessor from mdspan [PR120994]

2025-08-21 Thread Tomasz Kamiński
From: Luc Grosheintz This commit completes the implementation of P2897R7 by implementing and testing the template class aligned_accessor. PR libstdc++/120994 libstdc++-v3/ChangeLog: * include/bits/version.def (aligned_accessor): Add. * include/bits/version.h: Regenerate

[committed v6 1/2] libstdc++: Implement is_sufficiently_aligned [PR120994]

2025-08-21 Thread Tomasz Kamiński
From: Luc Grosheintz This commit implements and tests the function is_sufficiently_aligned from P2897R7. PR libstdc++/120994 libstdc++-v3/ChangeLog: * include/bits/align.h (is_sufficiently_aligned): New function. * include/bits/version.def (is_sufficiently_aligned): Add

Re: [PATCH] MAINTAINERS: Update my email address and stand down as AArch64 maintainer

2025-08-21 Thread Richard Earnshaw (lists)
On 21/08/2025 07:54, Richard Sandiford wrote: > Today is my last working day at Arm, so this patch switches my > MAINTAINERS entries to my personal email address. (It turns out > that I never updated some of the later entries...oops) > > In order to avoid setting false expectations, and to try to

Re: [PATCH 2/2] libstdc++: Use pthread_mutex_clocklock when TSan is active [PR121496]

2025-08-21 Thread Tomasz Kaminski
On Thu, Aug 21, 2025 at 11:34 AM Jonathan Wakely wrote: > This reverts r14-905-g3b7cb33033fbe6 which disabled the use of > pthread_mutex_clocklock when TSan is active. That's no longer needed, > because GCC has TSan interceptors for pthread_mutex_clocklock since GCC > 15.1 and Clang has them sinc

Re: [PATCH 1/2] libstdc++: Check _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK with #if [PR121496]

2025-08-21 Thread Tomasz Kaminski
On Thu, Aug 21, 2025 at 11:33 AM Jonathan Wakely wrote: > The change in r14-905-g3b7cb33033fbe6 to disable the use of > pthread_mutex_clocklock when TSan is active assumed that the > _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK macro was always checked with #if > rather than #ifdef, which was not true. >

[PATCH 2/2] libstdc++: Use pthread_mutex_clocklock when TSan is active [PR121496]

2025-08-21 Thread Jonathan Wakely
This reverts r14-905-g3b7cb33033fbe6 which disabled the use of pthread_mutex_clocklock when TSan is active. That's no longer needed, because GCC has TSan interceptors for pthread_mutex_clocklock since GCC 15.1 and Clang has them since 18.1.0 (released March 2024). The interceptor was added by http

[PATCH 1/2] libstdc++: Check _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK with #if [PR121496]

2025-08-21 Thread Jonathan Wakely
The change in r14-905-g3b7cb33033fbe6 to disable the use of pthread_mutex_clocklock when TSan is active assumed that the _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK macro was always checked with #if rather than #ifdef, which was not true. This makes the checks use #if consistently. libstdc++-v3/ChangeLo

Re: [RFC PATCH 4/7] x86: Add x86_64 Kernel Control Flow Integrity implementation

2025-08-21 Thread Peter Zijlstra
On Thu, Aug 21, 2025 at 12:26:37AM -0700, Kees Cook wrote: > Implement x86_64-specific KCFI backend: > > - Function preamble generation with type IDs positioned at -(4+prefix_nops) > offset from function entry point. > > - 16-byte alignment of KCFI preambles using calculated prefix NOPs: > al

[committed] libstdc++: Fix std::numeric_limits<__float128>::max_digits10 [PR121374]

2025-08-21 Thread Jonathan Wakely
When I added this explicit specialization in r14-1433-gf150a084e25eaa I used the wrong value for the number of mantissa digits (I used 112 instead of 113). Then when I refactored it in r14-1582-g6261d10521f9fd I used the value calculated from the incorrect value (35 instead of 36). libstdc++-v3/Ch

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Andrew Pinski
On Thu, Aug 21, 2025, 2:13 AM Peter Zijlstra wrote: > On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > > > > +/* Compute KCFI type ID for a function declaration or function type > > > (internal) */ > > > +static uint32_t > > > +compute_kcfi_type_id (tree fntype_or_fndecl) > > > +{

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-21 Thread Peter Zijlstra
On Thu, Aug 21, 2025 at 01:16:56AM -0700, Andrew Pinski wrote: > > +/* Compute KCFI type ID for a function declaration or function type > > (internal) */ > > +static uint32_t > > +compute_kcfi_type_id (tree fntype_or_fndecl) > > +{ > > + if (!fntype_or_fndecl) > > +return 0; > > + > > + cons

[committed] libstdc++: Suppress some more additional diagnostics [PR117294]

2025-08-21 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: PR c++/117294 * testsuite/20_util/optional/cons/value_neg.cc: Prune additional output for C++20 and later. * testsuite/20_util/scoped_allocator/69293_neg.cc: Match additional error for C++20 and later. --- Tested x86_64-linux. Pushed

Re: [PATCH v3] libstdc++: Implement std::dims from .

2025-08-21 Thread Tomasz Kaminski
Patches pushed. On Wed, Aug 20, 2025 at 7:17 PM Jonathan Wakely wrote: > On 21/07/25 17:50 +0200, Luc Grosheintz wrote: > >This commit implements the C++26 feature std::dims described in P2389R2. > >It sets the feature testing macro to 202406 and adds tests. > > > >Also fixes the test mdspan/ver

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-21 Thread Andrew Pinski
On Thu, Aug 21, 2025 at 12:59 AM Andrew Pinski wrote: > > On Thu, Aug 21, 2025 at 12:41 AM Kees Cook wrote: >> >> To support the KCFI type-id which needs to convert unique function >> prototypes into unique 32-bit values, add a subset of the Itanium C++ >> mangling ABI for C typeinfo of function

Re: [PATCH v2 0/2] Two cleanup patches for .

2025-08-21 Thread Tomasz Kaminski
The patch series is now on trunk, and will continue with the next series soon. Again. thank you for the contributions! On Wed, Aug 20, 2025 at 6:54 PM Jonathan Wakely wrote: > On Mon, 11 Aug 2025 at 21:19, Luc Grosheintz > wrote: > > > > This second iteration: > > > > - fixes the commit messa

Re: [PATCH v2 0/8] libstdc++: Sequence of improvements to .

2025-08-21 Thread Tomasz Kaminski
The patch series is now on trunk, and will continue with the next series soon. Thank you for the contributions, and I am looking forward to the next patches for review. On Wed, Aug 20, 2025 at 6:54 PM Jonathan Wakely wrote: > On 03/08/25 22:57 +0200, Luc Grosheintz wrote: > >The combined effect

Re: [PATCH] xtensa: Small improvement to "*btrue_INT_MIN"

2025-08-21 Thread Max Filippov
On Wed, Aug 20, 2025 at 4:30 AM Takayuki 'January June' Suwa wrote: > > This patch changes the implementation of the insn to test whether the > result itself is negative or not, rather than the MSB of the result of > the ABS machine instruction. This eliminates the need to consider bit- > endiann

[PATCH] c: Add folding of nullptr_t in some cases [PR121478]

2025-08-21 Thread Andrew Pinski
The middle-end does not fully understand NULLPTR_TYPE. So it gets confused a lot of the time when dealing with it. This adds the folding that is similarly done in the C++ front-end already. In some cases it should produce slightly better code as there is no reason to load from a nullptr_t variable

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-21 Thread Andrew Pinski
On Thu, Aug 21, 2025 at 12:41 AM Kees Cook wrote: > To support the KCFI type-id which needs to convert unique function > prototypes into unique 32-bit values, add a subset of the Itanium C++ > mangling ABI for C typeinfo of function prototypes. This gets us to the > first step: a string represent

[RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-21 Thread Kees Cook
To support the KCFI type-id which needs to convert unique function prototypes into unique 32-bit values, add a subset of the Itanium C++ mangling ABI for C typeinfo of function prototypes. This gets us to the first step: a string representation of the function prototype. Trying to extract only the

[PATCH] Merge BB and loop path in vect_analyze_stmt

2025-08-21 Thread Richard Biener
We have now common patterns for most of the vectorizable_* calls, so merge. This also avoids calling vectorizable_early_exit for BB vect and clarifies signatures of it and vectorizable_phi. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vectorizer.h (vectorizable_phi

[RFC PATCH 0/7] Introduce Kernel Control Flow Integrity ABI [PR107048]

2025-08-21 Thread Kees Cook
Hi! Repeating the start of the 3rd (core kcfi) patch's commit log: This series implements the Linux Kernel Control Flow Integrity ABI, which provides a function prototype based forward edge control flow integrity protection by instrumenting every indirect call to check for a hash

Re: [PATCH v5 1/2] libstdc++: Implement is_sufficiently_aligned [PR120994]

2025-08-21 Thread Jonathan Wakely
OK, thanks On Thu, 21 Aug 2025, 07:47 Tomasz Kamiński, wrote: > From: Luc Grosheintz > > This commit implements and tests the function is_sufficiently_aligned > from P2897R7. > > PR libstdc++/120994 > > libstdc++-v3/ChangeLog: > > * include/bits/align.h (is_sufficiently_aligned)

  1   2   >