[PATCH v1] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-03 Thread pan2 . li
From: Pan Li This patch would like to allow IMM for the operand 0 of ussub pattern. Aka .SAT_SUB(1023, y) as the below example. Form 1: #define DEF_SAT_U_SUB_IMM_FMT_1(T, IMM) \ T __attribute__((noinline)) \ sat_u_sub_imm##IMM##_##T##_fmt_1 (T y) \ {

[PATCH] RISC-V: Delete duplicate '#define RISCV_DWARF_VLENB'

2024-08-03 Thread Jin Ma
gcc/ChangeLog: * config/riscv/riscv.h (RISCV_DWARF_VLENB): Delete. --- gcc/config/riscv/riscv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index 6f040011864..74926f3f8ca 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/ri

Re: [RFC] Generalize formation of lane-reducing ops in loop reduction

2024-08-03 Thread Feng Xue OS
>> 1. Background >> >> For loop reduction of accumulating result of a widening operation, the >> preferred pattern is lane-reducing operation, if supported by target. Because >> this kind of operation need not preserve intermediate results of widening >> operation, and only produces reduced amount

Re: [PATCH] RISC-V: Delete duplicate '#define RISCV_DWARF_VLENB'

2024-08-03 Thread Jeff Law
On 8/3/24 4:10 AM, Jin Ma wrote: gcc/ChangeLog: * config/riscv/riscv.h (RISCV_DWARF_VLENB): Delete. OK jeff

[PATCH v2] c++, coroutines: Simplify separation of the user function body and ramp.

2024-08-03 Thread Iain Sandoe
On 2 Aug 2024, at 15:19, Jason Merrill wrote: > On 8/2/24 6:50 AM, Iain Sandoe wrote: >> This version simplifies the process by extrating the second case directly > typo thanks, fixed. >> +static bool >>+use_eh_spec_block (tree fn) >>+{ >>+ return (flag_exceptions && flag_enforce_eh_specs >>+

RE: [PATCH 0/1] Initial support for AVX10.2

2024-08-03 Thread Jiang, Haochen
> -Original Message- > From: Andi Kleen > Sent: Saturday, August 3, 2024 3:06 AM > To: Jiang, Haochen > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao ; > ubiz...@gmail.com > Subject: Re: [PATCH 0/1] Initial support for AVX10.2 > > > > > INT8 is actually char per my understanding. > > > > For

[PATCH] gimplify: Small RAW_DATA_CST gimplification fix

2024-08-03 Thread Jakub Jelinek
Hi! I've noticed the following testcase on top of the #embed patchset: https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655012.html https://gcc.gnu.org/pipermail/gcc-patches/

[PATCH] c: Speed up compilation of large char array initializers when not using #embed

2024-08-03 Thread Jakub Jelinek
Hi! The following patch on top of the #embed patchset https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655012.html https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655013.

[PATCH] c++: Speed up compilation of large char array initializers when not using #embed

2024-08-03 Thread Jakub Jelinek
Hi! The following patch (again, on top of the #embed patchset, so https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655012.html https://gcc.gnu.org/pipermail/gcc-patches/2024-

Re: [PATCH] gimplify: Small RAW_DATA_CST gimplification fix

2024-08-03 Thread Richard Biener
> Am 03.08.2024 um 20:14 schrieb Jakub Jelinek : > > Hi! > > I've noticed the following testcase on top of the #embed patchset: > https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655012.html > >

[committed] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in some powerpc* configurations [PR116007]

2024-08-03 Thread Jakub Jelinek
Hi! My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation. Unfortunately, that seems to fail building in some powerpc* configurations, where TFmode isn't available. quad.h has: #ifndef TFtype typedef float TFtype __attribute__ ((mode (TF))); #endif and uses TFtype

Re: [PATCH v1] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-03 Thread Jeff Law
On 8/3/24 3:33 AM, pan2...@intel.com wrote: From: Pan Li This patch would like to allow IMM for the operand 0 of ussub pattern. Aka .SAT_SUB(1023, y) as the below example. Form 1: #define DEF_SAT_U_SUB_IMM_FMT_1(T, IMM) \ T __attribute__((noinline)) \ sat_u_sub_imm##IMM

Re: [PATCH] IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]

2024-08-03 Thread Jeff Law
On 8/2/24 11:31 PM, Sam James wrote: Andrew Pinski writes: Late_combine exposed this latent bug in split_live_ranges_for_shrink_wrap. What it did was copy-prop regno 151 from regno 119 from: ``` (insn 2 264 3 2 (set (reg/f:DI 119 [ thisD.3697 ]) (reg:DI 151)) "/app/example.cpp":19:

Re: [RFC v1 0/2] c: Add _Lengthof operator

2024-08-03 Thread Alejandro Colomar
Hi Joseph, On Mon, Jul 29, 2024 at 11:13:08AM GMT, Joseph Myers wrote: > On Sun, 28 Jul 2024, Alejandro Colomar wrote: > > > gcc/Makefile.in | 1 + > > gcc/c-family/c-common.cc | 20 + > > gcc/c-family/c-common.def | 4 ++ > > gcc/c-family/c-common.h | 2 +

[RFC v3 1/3] gcc/: Rename array_type_nelts() => array_type_nelts_minus_one()

2024-08-03 Thread Alejandro Colomar
The old name was misleading. While at it, also rename some temporary variables that are used with this function, for consistency. Link: https://inbox.sourceware.org/gcc-patches/9fffd80-dca-2c7e-14b-6c9b509a7...@redhat.com/T/#m2f661c67c8f7b2c405c8c7fc3152dd85dc729120 Cc: Gabriel Ravier Cc: Marti

[RFC v3 0/3] c: Add __lengthof__ operator

2024-08-03 Thread Alejandro Colomar
Hi, v3: - Add some documentation. - Reject incomplete types. - Rename array_type_nelts()=>array_type_nelts_minus_one(). (However, I included that patch in this set only for completeness purposes; that patch is also sent standalone, and I would like it to be merged in the separate dis

[RFC v3 2/3] Merge definitions of array_type_nelts_top()

2024-08-03 Thread Alejandro Colomar
There were two identical definitions, and none of them are available where they are needed for implementing __lengthof__(). Merge them, and provide the single definition in gcc/tree.{h,cc}, where it's available for __lengthof__(). Signed-off-by: Alejandro Colomar --- gcc/cp/cp-tree.h

[RFC v3 3/3] c: Add __lengthof__() operator

2024-08-03 Thread Alejandro Colomar
This operator is similar to sizeof() but can only be applied to an array, and returns its length (number of elements). TO BE DECIDED BEFORE MERGING: It would be better to not evaluate the operand if the top-level array is not a VLA. FUTURE DIRECTIONS: We could make it wo

RE: [PATCH v1] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-03 Thread Li, Pan2
Thanks Jeff for comments, let me refine the comments in v2. Pan -Original Message- From: Jeff Law Sent: Sunday, August 4, 2024 6:25 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; rdapp@gmail.com Subject: Re: [PATCH v1] RISC-V: Support IMM f

Re: [RFC v3 3/3] c: Add __lengthof__() operator

2024-08-03 Thread Martin Uecker
Am Sonntag, dem 04.08.2024 um 01:17 +0200 schrieb Alejandro Colomar: > > FUTURE DIRECTIONS: > > We could make it work with array parameters to functions, and > somehow magically return the length designator of the array, > regardless of it being really a pointer. And maybe fl