[PATCH v1 2/2] RISC-V: Add testcases for unsigned vector .SAT_TRUNC form 4

2024-08-24 Thread pan2 . li
From: Pan Li This patch would like to add test cases for the unsigned vector .SAT_TRUNC form 4. Aka: Form 4: #define DEF_VEC_SAT_U_TRUNC_FMT_4(NT, WT) \ void __attribute__((noinline))\ vec_sat_u_trunc_##NT##_##WT##_fmt_4

[PATCH v1 1/2] RISC-V: Add testcases for unsigned scalar .SAT_TRUNC form 4

2024-08-24 Thread pan2 . li
From: Pan Li This patch would like to add test cases for the unsigned scalar quad and oct .SAT_TRUNC form 4. Aka: Form 4: #define DEF_SAT_U_TRUNC_FMT_4(NT, WT) \ NT __attribute__((noinline)) \ sat_u_trunc_##WT##_to_##NT##_fmt_4 (WT x) \ {

RE: [PATCH v2] Match: Support form 1 for scalar signed integer .SAT_ADD

2024-08-24 Thread Li, Pan2
> Wow. I wonder why this isn't simplified to never saturate since > signed x + y has undefined behavior on overflow? So I'd > expect instead > T sum = (unsigned T)x + (unsigned T)y; > to be used. Thanks, let me update in v3. Pan -Original Message- From: Richard Biener Sent: Thursday

RE: [PATCH v1] Match: Add type check for .SAT_ADD imm operand

2024-08-24 Thread Li, Pan2
Thanks Richard and Jakub for comments. Ideally would like to make sure the imm operand will have exactly the same type as operand 1. But for uint8_t/uint16_t types, the INTERGER_CST will become the (const_int 3) with int type before matching. Thus, add the type check like that, as well as some

Re: [PATCH] c++: Fix overeager Woverloaded-virtual with conversion operators [PR109918]

2024-08-24 Thread Simon Martin
Hi Jason, On 24 Aug 2024, at 15:13, Jason Merrill wrote: > On 8/23/24 12:44 PM, Simon Martin wrote: >> We currently emit an incorrect -Woverloaded-virtual warning upon the >> following >> test case >> >> === cut here === >> struct A { >>virtual operator int() { return 42; } >>virtual ope

Re: [PATCH] libcpp: deduplicate definition of padding size

2024-08-24 Thread Richard Biener
> Am 24.08.2024 um 16:47 schrieb Alexander Monakov : > > Tie together the two functions that ensure tail padding with > search_line_ssse3 via CPP_BUFFER_PADDING macro. Ok Richard > libcpp/ChangeLog: > >* internal.h (CPP_BUFFER_PADDING): New macro; use it ... >* charset.cc (_cpp_co

Re: [PATCH] testsuite: Run array54.C only for sync_int_long targets

2024-08-24 Thread Dimitar Dimitrov
On Tue, Aug 06, 2024 at 10:16:36PM +0300, Dimitar Dimitrov wrote: > The test case uses "atomic", which fails to link on > pru-unknown-elf target due to missing __atomic_load_4 symbol. > > Fix by filtering for sync_int_long effective target. Ensured that the > test still passes for x86_64-pc-linux

Re: [PATCH v1] Match: Add type check for .SAT_ADD imm operand

2024-08-24 Thread Jakub Jelinek
On Sat, Aug 24, 2024 at 07:33:06PM +0800, pan2...@intel.com wrote: > From: Pan Li > > This patch would like to add strict check for imm operand of .SAT_ADD > matching. We have no type checking for imm operand in previous, which > may result in unexpected IL to be catched by .SAT_ADD pattern. >

[patch] libgomp.texi: Document supported OpenMP 'interop' types for nvptx and gcn

2024-08-24 Thread Tobias Burnus
This patch comes on top of "[patch][v2] libgomp.texi: Document OpenMP's Interoperability Routines", https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661314.html But it documents the code added at "[patch][rfc] libgomp: Add OpenMP interop support to nvptx + gcn plugin", https://gcc.gnu.or

[x86_64 PATCH] Update STV's gains for TImode arithmetic right shifts on AVX2.

2024-08-24 Thread Roger Sayle
This patch tweaks timode_scalar_chain::compute_convert_gain to better reflect the expansion of V1TImode arithmetic right shifts by the i386 backend. The comment "see ix86_expand_v1ti_ashiftrt" appears after "case ASHIFTRT" in compute_convert_gain, and the changes below attempt to better match the

[PATCH] libcpp: deduplicate definition of padding size

2024-08-24 Thread Alexander Monakov
Tie together the two functions that ensure tail padding with search_line_ssse3 via CPP_BUFFER_PADDING macro. libcpp/ChangeLog: * internal.h (CPP_BUFFER_PADDING): New macro; use it ... * charset.cc (_cpp_convert_input): ...here, and ... * files.cc (read_file_guts): ...here,

[PATCH] contrib: Set check-params-in-docs.py to skip tables of values of a param

2024-08-24 Thread Filip Kastl
Hi, Here is the part of invoke.texi that currently confuses check-params-in-docs.py: @item aarch64-autovec-preference Force an ISA selection strategy for auto-vectorization. @table @samp @item default Use the default heuristics. @item asimd-only Use only Advanced SIMD for auto-vectorization. @ite

Re: [PATCH] c++: Add most missing C++20 and C++23 names to cxxapi-data.csv

2024-08-24 Thread Jonathan Wakely
On Sat, 24 Aug 2024 at 14:55, Jonathan Wakely wrote: > > On Sat, 24 Aug 2024 at 14:14, Jason Merrill wrote: > > > > On 8/23/24 8:41 AM, Jonathan Wakely wrote: > > > Tested x86_64-linux. OK for trunk? > > > > OK. > > I've just noticed that this changes the copyright dates from 2022-2024 > to just 2

Re: [PATCH] c++: Add most missing C++20 and C++23 names to cxxapi-data.csv

2024-08-24 Thread Jonathan Wakely
On Sat, 24 Aug 2024 at 14:14, Jason Merrill wrote: > > On 8/23/24 8:41 AM, Jonathan Wakely wrote: > > Tested x86_64-linux. OK for trunk? > > OK. I've just noticed that this changes the copyright dates from 2022-2024 to just 2024 (see the excerpts of the patch retained below). The python script jus

Re: [PATCH v1] Match: Add type check for .SAT_ADD imm operand

2024-08-24 Thread Richard Biener
> Am 24.08.2024 um 13:33 schrieb pan2...@intel.com: > > From: Pan Li > > This patch would like to add strict check for imm operand of .SAT_ADD > matching. We have no type checking for imm operand in previous, which > may result in unexpected IL to be catched by .SAT_ADD pattern. > > Howev

Re: [PATCH] c++: Add testcase for (now fixed) regression [PR113746]

2024-08-24 Thread Jason Merrill
On 8/23/24 5:11 AM, Simon Martin wrote: The case in PR113746 used to ICE until commit f04dc89a991. This patch Please use the git gcc-descr output instead of the raw SHA for referring to previous commits; in this case that would be r15-123-gf04dc89a991ddc or just r15-123. OK with that tweak.

Re: [PATCH] c++: Add most missing C++20 and C++23 names to cxxapi-data.csv

2024-08-24 Thread Jason Merrill
On 8/23/24 8:41 AM, Jonathan Wakely wrote: Tested x86_64-linux. OK for trunk? OK. -- >8 -- This includes uncommenting the atomic_flag non-member functions, which were added by PR libstdc++/103934. Also generate a hint for std::ignore, which was recently tweaked to be more generally useful b

Re: [PATCH] c++: Fix overeager Woverloaded-virtual with conversion operators [PR109918]

2024-08-24 Thread Jason Merrill
On 8/23/24 12:44 PM, Simon Martin wrote: We currently emit an incorrect -Woverloaded-virtual warning upon the following test case === cut here === struct A { virtual operator int() { return 42; } virtual operator char() = 0; }; struct B : public A { operator char() { return 'A'; } }; ==

Re: [PATCH 3/9 v4] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-24 Thread Jason Merrill
On 8/24/24 7:38 AM, Iain Sandoe wrote: Hi Jason, + return build_op_delete_call_1 (code, addr, size, global_p, + two_args_priority_p, placement, alloc_fn, + complain); +} Rather than having a new overload with the same name and a bo

[PATCH] gimple ssa: switchconv: Use __builtin_popcount and support more types in exp transform [PR116355]

2024-08-24 Thread Filip Kastl
Hi, bootstrapped and regtested on x86_64-linux. Ok to push? Cheers, Filip Kastl -- 8< -- The gen_pow2p function generates (a & -a) == a as a fallback for POPCOUNT (a) == 1. Not only is the bitmagic not equivalent to POPCOUNT (a) == 1 but it also introduces UB (consider signed a = INT_MIN).

Re: [PATCH] c++/coros: do not assume coros don't nest [PR113457]

2024-08-24 Thread Arsen Arsenović
Hi, Arsen Arsenović writes: > gcc/testsuite/ChangeLog: > > * g++.dg/coroutines/pr113457-1.C: New test. > * g++.dg/coroutines/pr113457.C: New test. Just noticed that pr113457.C actually has excess errors. Unsure how I didn't notice on initial testing (the regstrap caught it) - must'

[PATCH 3/9 v4] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-24 Thread Iain Sandoe
Hi Jason, >>+ return build_op_delete_call_1 (code, addr, size, global_p, >>+ two_args_priority_p, placement, alloc_fn, >>+ complain); >>+} >Rather than having a new overload with the same name and a bool parameter that >will only be used t

[PATCH v1] Match: Add type check for .SAT_ADD imm operand

2024-08-24 Thread pan2 . li
From: Pan Li This patch would like to add strict check for imm operand of .SAT_ADD matching. We have no type checking for imm operand in previous, which may result in unexpected IL to be catched by .SAT_ADD pattern. However, things may become more complicated due to the int promotion. This me

RE: [PATCH v1] Vect: Promote unsigned .SAT_ADD constant operand for vectorizable_call

2024-08-24 Thread Li, Pan2
Thanks Jakub and Richard for explanation and help, I will double check saturate matching for the const_int strict check. Back to this below case, do we still need some ad-hoc step to unblock the type check when vectorizable_call? For example, the const_int 9u may have int type for .SAT_ADD(uint8

Re: [PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-24 Thread Georg-Johann Lay
Am 23.08.24 um 17:47 schrieb Jeff Law: On 8/23/24 9:45 AM, Richard Biener wrote: Am 23.08.2024 um 16:49 schrieb Jeff Law : On 8/23/24 6:02 AM, Georg-Johann Lay wrote: Hi, this fails on machines that don't support scheduling: cc1: warning: instruction scheduling not supported on this target ma

Re: [RFC/RFA][PATCH v4 06/12] aarch64: Implement new expander for efficient CRC computation

2024-08-24 Thread Mariam Arutunian
On Fri, Aug 23, 2024, 15:03 Richard Biener wrote: > On Fri, Aug 23, 2024 at 9:55 AM Mariam Arutunian > wrote: > > > > > > On Wed, Aug 21, 2024 at 5:56 PM Richard Sandiford < > richard.sandif...@arm.com> wrote: > >> > >> Mariam Arutunian writes: > >> > This patch introduces two new expanders for

Re: [PATCH] c++: Allow standard attributes after closing square bracket in new-type-id [PR110345]

2024-08-24 Thread Jakub Jelinek
On Mon, Aug 19, 2024 at 05:18:14PM -0400, Jason Merrill wrote: > > The following patch parses it there, for the non-outermost arrays > > applies normally the attributes to the array type, for the outermost > > where we just set *nelts and don't really build an array type just > > warns that we igno