[pushed] c++: trait as typename scope [PR116052]

2024-07-26 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The stdexec library currently wrongly ends up using __decay as the scope of a typename, which leads to a crash. Let's give an error instead. PR c++/116052 gcc/cp/ChangeLog: * mangle.cc (write_prefix): Handle TRAIT_EXPR.

Re: [RFH PATCH] c++: Implement C++26 P2963R3 - Ordering of constraints involving fold expressions [PR115746]

2024-07-26 Thread Jakub Jelinek
On Fri, Jul 26, 2024 at 08:43:44PM +0200, Jakub Jelinek wrote: > Yeah, I saw ARGUMENT_PACK_SELECT being used, but didn't notice that > important > if (arg_pack && TREE_CODE (arg_pack) == ARGUMENT_PACK_SELECT) > arg_pack = ARGUMENT_PACK_SELECT_FROM_PACK (arg_pack); > part of tsubst_pac

Re: [RFH PATCH] c++: Implement C++26 P2963R3 - Ordering of constraints involving fold expressions [PR115746]

2024-07-26 Thread Jakub Jelinek
On Fri, Jul 26, 2024 at 09:49:27PM +0200, Jakub Jelinek wrote: > On Fri, Jul 26, 2024 at 08:43:44PM +0200, Jakub Jelinek wrote: > > Yeah, I saw ARGUMENT_PACK_SELECT being used, but didn't notice that > > important > > if (arg_pack && TREE_CODE (arg_pack) == ARGUMENT_PACK_SELECT) > > a

Re: [PATCH 1/5] RISC-V: Small stack tie changes

2024-07-26 Thread Jeff Law
On 7/26/24 12:43 PM, Raphael Zinsly wrote: On Fri, Jul 26, 2024 at 2:00 PM Jeff Law wrote: On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: ... diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md index 46c46039c33..5780c5abacf 100644 --- a/gcc/config/riscv/riscv.md +++ b/gc

Re: [PATCH 2/5] RISC-V: Move riscv_v_adjust_scalable_frame

2024-07-26 Thread Jeff Law
On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: Move riscv_v_adjust_scalable_frame () in preparation for the stack clash protection support. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_v_adjust_scalable_frame): Move closer to riscv_expand_prologue. Guessing the point is

Re: [RFH PATCH] c++: Implement C++26 P2963R3 - Ordering of constraints involving fold expressions [PR115746]

2024-07-26 Thread Patrick Palka
On Fri, 26 Jul 2024, Jakub Jelinek wrote: > On Fri, Jul 26, 2024 at 09:49:27PM +0200, Jakub Jelinek wrote: > > On Fri, Jul 26, 2024 at 08:43:44PM +0200, Jakub Jelinek wrote: > > > Yeah, I saw ARGUMENT_PACK_SELECT being used, but didn't notice that > > > important > > > if (arg_pack && TREE_C

[PATCH] RISC-V: Expand subreg move via slide if necessary [PR116086].

2024-07-26 Thread Robin Dapp
Hi, when the source mode is potentially larger than one vector (e.g. an LMUL2 mode for VLEN=128) we don't know which vector the subreg actually refers to. For zvl128b and LMUL=2 the subreg in (subreg:V2DI (reg:V4DI)) could actually be the a full (high) vector register of a two-register group (at

Re: [RFH PATCH] c++: Implement C++26 P2963R3 - Ordering of constraints involving fold expressions [PR115746]

2024-07-26 Thread Jakub Jelinek
On Fri, Jul 26, 2024 at 04:42:36PM -0400, Patrick Palka wrote: > > // P2963R3 - Ordering of constraints involving fold expressions > > // { dg-do compile { target c++20 } } > > > > template concept C = (__is_same (T, int) && ...); > > template > > struct S { > > template requires (C) > > st

Re: [PATCH 3/5] RISC-V: Stack-clash protection implemention

2024-07-26 Thread Jeff Law
On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: This implements stack-clash protection for riscv, with riscv_allocate_and_probe_stack_space being based of aarch64_allocate_and_probe_stack_space from aarch64's implementation. We enforce the probing interval and the guard size to always be eq

Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-26 Thread Jeff Law
On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: Adds basic support to vector stack-clash protection using a loop to do the probing and stack adjustments. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_allocate_and_probe_stack_loop): New function. (riscv_v_adjust_scal

Re: [PATCH 5/5] RISC-V: Enable stack clash in alloca

2024-07-26 Thread Jeff Law
On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: Add the TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE to riscv in order to enable stack clash protection when using alloca. The code and tests are the same used by aarch64. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_compute_fram

Re: [PATCH v2] RISC-V: Add basic support for the Zacas extension

2024-07-26 Thread Jeff Law
On 7/23/24 6:39 PM, Patrick O'Neill wrote: (define_expand "atomic_compare_and_swap" [(match_operand:SI 0 "register_operand" "") ;; bool output (match_operand:GPR 1 "register_operand" "") ;; val output (match_operand:GPR 2 "memory_operand" "");; memory - (match_operand:

Re: [RFH PATCH] c++: Implement C++26 P2963R3 - Ordering of constraints involving fold expressions [PR115746]

2024-07-26 Thread Patrick Palka
On Fri, 26 Jul 2024, Jakub Jelinek wrote: > On Fri, Jul 26, 2024 at 04:42:36PM -0400, Patrick Palka wrote: > > > // P2963R3 - Ordering of constraints involving fold expressions > > > // { dg-do compile { target c++20 } } > > > > > > template concept C = (__is_same (T, int) && ...); > > > templat

Re: [PATCH v2] RISC-V: Add basic support for the Zacas extension

2024-07-26 Thread Jeff Law
On 7/23/24 6:15 PM, Patrick O'Neill wrote: From: Gianluca Guida This patch adds support for amocas.{b|h|w|d}. Support for amocas.q (64/128 bit cas for rv32/64) will be added in a future patch. Extension: https://github.com/riscv/riscv-zacas Ratification: https://jira.riscv.org/browse/RVS-68

Re: [to-be-committed] [RISC-V][target/116085] Fix rv64 minmax extension avoidance splitter

2024-07-26 Thread Jeff Law
On 7/26/24 1:18 PM, Philipp Tomsich wrote: Nitpick: a typo slipped into the comment — "regsiter" -> "register". Thanks. The pre-commit tester also pointed out a couple formatting nits. I'll fix both. Jeff

[PATCH ver 2] rs6000, Add new overloaded vector shift builtin int128, varients

2024-07-26 Thread Carl Love
GCC developers: Version 2, updated rs6000-overload.def to remove adding additonal internal names and to change XXSLDWI_Q to XXSLDWI_1TI per comments from Kewen.  Move new documentation statement for the PIVPR built-ins per comments from Kewen.  Updated dg-do-run directive and added comment ab

Re: [PATCH] RISC-V: Expand subreg move via slide if necessary [PR116086].

2024-07-26 Thread Jeff Law
On 7/26/24 2:42 PM, Robin Dapp wrote: Hi, when the source mode is potentially larger than one vector (e.g. an LMUL2 mode for VLEN=128) we don't know which vector the subreg actually refers to. For zvl128b and LMUL=2 the subreg in (subreg:V2DI (reg:V4DI)) could actually be the a full (high) v

[PATCH] rs6000, document built-ins vec_test_lsbb_all_ones and, vec_test_lsbb_all_zeros

2024-07-26 Thread Carl Love
GCC maintainers: Per a report from a user, the existing vec_test_lsbb_all_ones and, vec_test_lsbb_all_zeros built-ins are not documented in the GCC documentation file. The following patch adds missing documentation for the vec_test_lsbb_all_ones and, vec_test_lsbb_all_zeros built-ins. Plea

[PATCH] rs6000, add comment to VEC_IC definition

2024-07-26 Thread Carl Love
GCC maintainers: This patch adds a comment to the VEC_IC definitions to clarify the V1TI "TARGET_POWER10" mode per the request by Segher in the feedback to patch "https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658156.html";. https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658156.html

[pushed] diagnostics: SARIF output: capture #include information (PR 107941; §3.34)

2024-07-26 Thread David Malcolm
This patch extends our SARIF output to capture relationships between locations within a result (§3.34). In particular, this captures chains of #includes relating to diagnostics and to events within diagnostic paths. For example, consider: include-chain-1.c: #include "include-chain-1.h" inclu

Re: [PATCH] c++/modules: Ensure deduction guides are always reachable [PR115231]

2024-07-26 Thread Nathaniel Shead
On Fri, Jul 26, 2024 at 01:17:57PM -0400, Jason Merrill wrote: > On 7/26/24 12:52 AM, Nathaniel Shead wrote: > > On Tue, Jul 23, 2024 at 04:17:22PM -0400, Jason Merrill wrote: > > > On 6/15/24 10:29 PM, Nathaniel Shead wrote: > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?

[PATCH] middle-end: Add and use few helper methods for current_properties

2024-07-26 Thread Andrew Pinski
While working on isel, I found that the current way of doing current_properties in function can easily make a mistake and having to do stuff like `(a & b ) == 0` and `a |= b;` and `a &= ~b;` is not so obvious what was going on. So let's add a few helper methods to function: * set_property * unset_

RE: [PATCH v1] Match: Support .SAT_SUB with IMM op for form 1-4

2024-07-26 Thread Li, Pan2
> OK. Committed, thanks Richard. Pan -Original Message- From: Richard Biener Sent: Friday, July 26, 2024 9:32 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; tamar.christ...@arm.com; jeffreya...@gmail.com; rdapp@gmail.com Subject: Re: [PAT

<    1   2