[PATCH v1 1/1] libstdc++: Improve diagnostic message for `cmp_*` and `in_range`.

2025-05-26 Thread Luc Grosheintz
Without the message, the compiler output can be very short, e.g. as short as a `required from here`. If the output includes the line of code that trigges the static_assert, the user might interpret it as "must be a standard integer", which is incorrect, because that term doesn't cover extended inte

[PATCH v1 0/1] Add error message to cmp_* and in_range.

2025-05-26 Thread Luc Grosheintz
While reading the compiler output of make check-target-libstdc++-v3 for buggy code, e.g. cmp_equal(1.0, 1.0), the error message was very short, and I saw no hint that neither of the two template arguments weren't integers. Essentially, the trace was: 1. my faulty line 2. required from he

Re: [PATCH] arm: always enable both simd and mve builtins

2025-05-26 Thread Christophe Lyon
On Mon, 26 May 2025 at 18:35, Christophe Lyon wrote: > > We get lots of error messages when compiling arm_neon.h under > e.g. -mcpu=cortex-m55, because Neon builtins are enabled only when > !TARGET_HAVE_MVE. This has been the case since MVE support was > introduced. > > This patch uses an approac

Re: [PATCH] arm_neon.h: remove useless push/pop pragmas

2025-05-26 Thread Christophe Lyon
On Mon, 26 May 2025 at 18:14, Christophe Lyon wrote: > > Remove #pragma GCC target ("arch=armv8.2-a+bf16") and preceding > target and is thus useless. I guess this should read: Remove #pragma GCC target ("arch=armv8.2-a+bf16") since it matches the preceding pragma GCC target and is thus useless.

Re: [PATCH v1 1/3] RISC-V: Leverage vaadd.vv for signed standard name avg_floor

2025-05-26 Thread Robin Dapp
-(define_expand "avg3_floor" - [(set (match_operand: 0 "register_operand") - (truncate: -(ashiftrt:VWEXTI - (plus:VWEXTI - (sign_extend:VWEXTI - (match_operand: 1 "register_operand")) - (sign_extend:VWEXTI - (match_operand: 2 "register_operand"))] +(define_expan

Re: [PATCH v2] driver: Fix multilib_os_dir and multiarch_dir for those target use TARGET_COMPUTE_MULTILIB

2025-05-26 Thread Kito Cheng
Pushed to trunk :) On Wed, May 21, 2025 at 2:35 AM Jeff Law wrote: > > > > On 5/19/25 12:48 AM, Kito Cheng wrote: > > Hi Jin: > > > > Thanks for heads up:) > > > > Hi Jeff: > > > > I've rebased that on the trunk and everything seems right, do you think > > it's OK for the trunk? > Yea, let's get

[PATCH 1/2] forwprop: Change test in loop of optimize_memcpy_to_memset

2025-05-26 Thread Andrew Pinski
This was noticed in the review of copy propagation for aggregates patch, instead of checking for a NULL or a non-ssa name of vuse, we should instead check if it the vuse is a default name and stop then. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-ssa-forwprop.cc (o

[PATCH 2/2] forwprop: Add stats for memcpy->memset

2025-05-26 Thread Andrew Pinski
As part of the review of copy prop for aggregates, it was mentioned there should be some statistics added, and I noticed the memcpy->memset was missing the statistics too. So this adds that. gcc/ChangeLog: * tree-ssa-forwprop.cc (optimize_memcpy_to_memset): Adds statistics when th

Re: [PATCH v2] c++: Unwrap type traits defined in terms of builtins within diagnostics [PR117294]

2025-05-26 Thread Nathaniel Shead
On Wed, Nov 27, 2024 at 11:45:40AM -0500, Patrick Palka wrote: > On Fri, 8 Nov 2024, Nathaniel Shead wrote: > > > Does this approach seem reasonable? I'm pretty sure that the way I've > > handled the templating here is unideal but I'm not sure what a neat way > > to do what I'm trying to do here

[PATCH v1 1/3] RISC-V: Leverage vaadd.vv for signed standard name avg_floor

2025-05-26 Thread pan2 . li
From: Pan Li The signed avg_floor totally match the sematics of fixed point rvv insn vaadd, within round down. Thus, leverage it directly to implement the avf_floor. The spec of RVV is somehow not that clear about the difference between the float point and fixed point for the rounding that disc

[PATCH v1 3/3] RISC-V: Add test cases for avg_floor vaadd implementation

2025-05-26 Thread pan2 . li
From: Pan Li Add asm and run testcase for avg_floor vaadd implementation. The below test suites are passed for this patch series. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/avg.h: New test. * gcc.target/riscv/rvv/autovec/avg_dat

[PATCH v1 2/3] RISC-V: Reconcile the existing test for avg_floor

2025-05-26 Thread pan2 . li
From: Pan Li Some existing avg_floor test need updated due to change to leverage vaadd.vv directly. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/avg-1.c: Update asm check to vaadd. * gcc.target/riscv/rvv/autovec/vls/avg-2.c: Ditto. * gcc.target/ris

[PATCH v1 0/3] Refine the avg_floor with fixed point vaadd

2025-05-26 Thread pan2 . li
From: Pan Li The spec of RVV is somehow not that clear about the difference between the float point and fixed point for the rounding that discard least-significant information. For float point which is not two's complement, the "discard least-significant information" indicates truncation round.

[PATCH V2] For datarefs with big gap, split them into different groups.

2025-05-26 Thread liuhongt
> > It's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119181 > > Please mention that in the changelog. Also ... Changed. > Please put this condition in the set of conds we test in the else branch of > ... > > > >           /* Do not place the same access in the interleaving chain > > > twice.

Re: [ping^2] [PATCH v2] MIPS: Fix the issue with the '-fpatchable-function-entry=' feature.

2025-05-26 Thread Lulu Cheng
Ping^2 在 2025/5/13 下午2:06, Lulu Cheng 写道: Ping? 在 2025/5/9 上午10:14, Lulu Cheng 写道: From: ChengLulu PR target/99217 gcc/ChangeLog: * config/mips/mips.cc (mips_start_function_definition): Implements the functionality of '-fpatchable-function-entry='. (mips_print_patchable_fun

Re: simple frm save/restore strategy (was Re: [PATCH 3/6] RISC-V: frm/mode-switch: remove dubious frm edge insertion before call_insn)

2025-05-26 Thread Vineet Gupta
On 5/26/25 01:18, Robin Dapp wrote: >> 2. OK'ish: A bunch of testcases see more reads/writes as PRE of redundant >> read/writes is punted to later passes which obviously needs more work. >> >> 3. NOK: We loose the ability to instrument local RM writes - especially in >> the >> testsuite. >>   e.g.

Re: [AUTOFDO] Merge profiles of clones before annotating

2025-05-26 Thread Kugan Vivekanandarajah
Hi Homza. > On 26 May 2025, at 7:48 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> >> >>> On 26 May 2025, at 5:34 pm, Jan Hubicka wrote: >>> >>> External email: Use caution opening links or attachments >>> >>> >>> Hi, >>> also, please, can you

Re: [PATCH] gimple-fold: Implement simple copy propagation for aggregates [PR14295]

2025-05-26 Thread Andrew Pinski
On Mon, May 26, 2025 at 1:40 PM Andrew Pinski wrote: > > On Mon, May 26, 2025 at 5:36 AM Richard Biener > wrote: > > > > On Sun, May 18, 2025 at 10:58 PM Andrew Pinski > > wrote: > > > > > > This implements a simple copy propagation for aggregates in the similar > > > fashion as we already do f

Re: [PATCH] gimple-fold: Implement simple copy propagation for aggregates [PR14295]

2025-05-26 Thread Andrew Pinski
On Mon, May 26, 2025 at 5:36 AM Richard Biener wrote: > > On Sun, May 18, 2025 at 10:58 PM Andrew Pinski > wrote: > > > > This implements a simple copy propagation for aggregates in the similar > > fashion as we already do for copy prop of zeroing. > > > > Right now this only looks at the previo

Re: Fwd: [PATCH] testsuite: Fix up dg-do-if

2025-05-26 Thread Alexandre Oliva
On May 26, 2025, Xi Ruoyao wrote: > gcc/testsuite/ChangeLog: > * lib/target-supports-dg.exp (dg-do-if): Pass the line number > to > dg-do. Thanks! I support that fix, FWIW. Indeed, an identical fix was included (but remains unreviewed) in https://gcc.gnu.org/pipermail/gcc-patches/

Re: [PATCH v4 2/8] libstdc++: Implement layout_left from mdspan.

2025-05-26 Thread Luc Grosheintz
On 5/26/25 18:17, Tomasz Kaminski wrote: On Mon, May 26, 2025 at 4:15 PM Luc Grosheintz wrote: Implements the parts of layout_left that don't depend on any of the other layouts. libstdc++-v3/ChangeLog: * include/std/mdspan (layout_left): New class. * src/c++23/std.cc.in:

Re: [PATCH] fortran: add constant input support for trig functions with half-revolutions

2025-05-26 Thread Harald Anlauf
Am 26.05.25 um 18:36 schrieb Steve Kargl: On Mon, May 26, 2025 at 09:30:59AM +, Yuao Ma wrote: Hi Steve, I looked at the patch in a bit more detail, and I am not thrilled with large-scale whitespace changes mingled with functional changes. It makes the patch harder to read and review. I'

[committed] c-c++-common/gomp/{attrs-,}metadirective-3.c: Fix expected result [PR118694]

2025-05-26 Thread Tobias Burnus
Committed as r16-883-g5d6ed6d604ff94. Silence errors when the error supports nvptx offloading. Seehttps://gcc.gnu.org/PR118694 (esp. comment 9) why we cannot easily nesting silence the error. (Short answer: 'target' call is different if teams is present but that's only known when processing the

[PATCH v1] rs6000: Restore opaque overload variant for correct diagnostics

2025-05-26 Thread Kishan Parmar
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. After r12-5752-gd08236359eb229, a new bif infrastructure was introduced which stopped using opaque vector types (e.g. opaque_V4SI_type_node) for overloaded built-in functions, which led to incorrect and misleadi

Re: [PATCH] libstdc++: Make debug iterator pointer sequence const [PR116369]

2025-05-26 Thread François Dumont
Ok, I'll give it another try. Trying to use the same approach for targets using gnu.ver and others thought, seems more reasonable to me. François On 22/05/2025 09:28, Jonathan Wakely wrote: On Thu, 22 May 2025, 08:26 Jonathan Wakely, wrote: On Thu, 15 May 2025, 06:26 François Dumo

Re: [PATCH] fortran: add constant input support for trig functions with half-revolutions

2025-05-26 Thread Steve Kargl
On Mon, May 26, 2025 at 09:30:59AM +, Yuao Ma wrote: > Hi Steve, > > > I looked at the patch in a bit more detail, and > > I am not thrilled with large-scale whitespace > > changes mingled with functional changes. It makes > > the patch harder to read and review. > > I'm not sure which file y

[PATCH] arm: always enable both simd and mve builtins

2025-05-26 Thread Christophe Lyon
We get lots of error messages when compiling arm_neon.h under e.g. -mcpu=cortex-m55, because Neon builtins are enabled only when !TARGET_HAVE_MVE. This has been the case since MVE support was introduced. This patch uses an approach similar to what we do on aarch64, but only partially since Neon i

[committed] libstdc++: Run in_place constructor test for std::indirect [PR119152]

2025-05-26 Thread Tomasz Kamiński
In indirect/ctor.cc test_inplace_ctor function was defined, but never called. PR libstdc++/119152 libstdc++-v3/ChangeLog: * testsuite/std/memory/indirect/ctor.cc: Run test_inplace_ctor. --- Tested on x86_64-linux. Pushed to trunk. libstdc++-v3/testsuite/std/memory/indirect/ctor

Re: [PATCH v4 2/8] libstdc++: Implement layout_left from mdspan.

2025-05-26 Thread Tomasz Kaminski
On Mon, May 26, 2025 at 4:15 PM Luc Grosheintz wrote: > Implements the parts of layout_left that don't depend on any of the > other layouts. > > libstdc++-v3/ChangeLog: > > * include/std/mdspan (layout_left): New class. > * src/c++23/std.cc.in: Add layout_left. > > Signed-off-by:

[PATCH] arm_neon.h: remove useless push/pop pragmas

2025-05-26 Thread Christophe Lyon
Remove #pragma GCC target ("arch=armv8.2-a+bf16") and preceding target and is thus useless. gcc/ChangeLog: * config/arm/arm_neon.h: Remove useless push/pop pragmas. --- gcc/config/arm/arm_neon.h | 5 - 1 file changed, 5 deletions(-) diff --git a/gcc/config/arm/arm_neon.h b/gcc/confi

[PATCH] testsuite: arm: add needed -mcpu / -march to arm_crypto_ok

2025-05-26 Thread Christophe Lyon
This effective target implicitly expects -march=armv8-a, otherwise with a toolchain configured for instance with --with-cpu=cortex-m0 --with-float=soft, it fails even when trying -mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp: arm_neon.h:45:2: error: #error "NEON intrinsics not available with the s

Re: [Patch] OpenMP/C++: Avoid ICE for BIND_EXPR with empty BIND_EXPR_BLOCK [PR120413]

2025-05-26 Thread Tobias Burnus
Jakub Jelinek wrote: There is also BIND_EXPR_VARS, dunno if that should be walked instead or in addition. The usage is to ensure that variables are mapped with lambdas (→ closure_vars_accessed.add (…)) but not if they are local variables (→ data->local_decls.add (var)). The 'closure_vars_ac

[PATCH] testsuite, arm: factorize arm_v8_neon_ok flags

2025-05-26 Thread Christophe Lyon
Like we do in other effective-targets, add "-mcpu=unset -march=armv8-a" directly when setting et_arm_v8_neon_flags in arm_v8_neon_ok_nocache, to avoid having to add these two flags in all users of arm_v8_neon_ok. This avoids duplication and possible typos. gcc/testsuite/ChangeLog: * lib/t

Re: [PATCH] testsuite: Restore dg-do run on pr116906 and pr78185 tests

2025-05-26 Thread Christophe Lyon
On Mon, 26 May 2025 at 17:14, Christophe Lyon wrote: > > Commit r15-7152-g57b706d141b87c removed > /* { dg-do run { target*-*-linux* *-*-gnu* *-*-uclinux* } } */ > > from these tests, turning them into 'compile' only tests, even when > they could be executed. > > This patch adds > /* { dg-do run }

[PATCH] testsuite: Restore dg-do run on pr116906 and pr78185 tests

2025-05-26 Thread Christophe Lyon
Commit r15-7152-g57b706d141b87c removed /* { dg-do run { target*-*-linux* *-*-gnu* *-*-uclinux* } } */ from these tests, turning them into 'compile' only tests, even when they could be executed. This patch adds /* { dg-do run } */ which is OK since the tests are correctly skipped if needed thank

PING² — Re: PING (and v2) – [Patch] nvptx/nvptx.opt: Update -march-map= for newer sm_xxx

2025-05-26 Thread Tobias Burnus
PING² On May 12, 2025, Tobias Burnus wrote: PING. There is actually a minor update as meanwhile CUDA 12.8 was released that added the 'f' suffix and sm_103 and sm_121. Still, the pattern remains the same; hence, a normal PING. On April 25, 2025, Tobias Burnus wrote: The idea of -march-map= i

Re: [PATCH RFA] fold: DECL_VALUE_EXPR isn't simple [PR120400]

2025-05-26 Thread Iain Sandoe
Hi Jason > On 26 May 2025, at 15:07, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu, OK for trunk? > > Iain, will you verify that one of your coroutine testcases breaks without this > fix? Yes; all current coroutine ramp cleanups are exposed to (potential) UB at -O > 0. This patch reso

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-05-26 Thread Alexander Monakov
On Mon, 26 May 2025, Richard Biener wrote: > On Fri, May 23, 2025 at 2:31 PM Alexander Monakov wrote: > > > > In PR 105965 we accepted a request to form FMA instructions when the > > source code is using a narrow generic vector that contains just one > > element, corresponding to V1SF or V1DF mo

[PATCH RFA] fold: DECL_VALUE_EXPR isn't simple [PR120400]

2025-05-26 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, OK for trunk? Iain, will you verify that one of your coroutine testcases breaks without this fix? I don't think lambda or anonymous union uses of DECL_VALUE_EXPR can break in the same way, though this change is also correct for them. -- 8< -- This PR noted that fold_

[PATCH v4 8/8] libstdc++: Make layout_left(layout_stride) noexcept.

2025-05-26 Thread Luc Grosheintz
[mdspan.layout.left.cons] of N4950 states that this ctor is not noexcept. Since, all other ctors of layout_left, layout_right or layout_stride are noexcept, the choice was made, based on [res.on.exception.handling], to make this ctor noexcept. Two other major implementations of the STL make the sa

[PATCH v4 7/8] libstdc++: Add tests for layout_stride.

2025-05-26 Thread Luc Grosheintz
Implements the tests for layout_stride and for the features of the other two layouts that depend on layout_stride. libstdc++-v3/ChangeLog: * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add tests for layout_stride. * testsuite/23_containers/mdspan/layouts/c

[PATCH v4 3/8] libstdc++: Add tests for layout_left.

2025-05-26 Thread Luc Grosheintz
Implements a suite of tests for the currently implemented parts of layout_left. The individual tests are templated over the layout type, to allow reuse as more layouts are added. libstdc++-v3/ChangeLog: * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: New test. * tes

[PATCH v4 5/8] libstdc++: Add tests for layout_right.

2025-05-26 Thread Luc Grosheintz
Adds tests for layout_right and for the parts of layout_left that depend on layout_right. libstdc++-v3/ChangeLog: * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add tests for layout_stride. * testsuite/23_containers/mdspan/layouts/ctors.cc: Add tests for

[PATCH v4 6/8] libstdc++: Implement layout_stride from mdspan.

2025-05-26 Thread Luc Grosheintz
Implements the remaining parts of layout_left and layout_right; and all of layout_stride. The implementation of layout_stride::mapping::is_exhaustive applies the following change to the standard: 4266. layout_stride::mapping should treat empty mappings as exhaustive https://cplusplus.github.io

RE: [PATCH 1/2]middle-end: Add new parameter to scale scalar loop costing in vectorizer

2025-05-26 Thread Richard Biener
On Mon, 19 May 2025, Tamar Christina wrote: > > > +-param=vect-scalar-cost-multiplier= > > > +Common Joined UInteger Var(param_vect_scalar_cost_multiplier) Init(1) > > IntegerRange(0, 10) Param Optimization > > > +The scaling multiplier to add to all scalar loop costing when performing > > vec

[PATCH v4 1/8] libstdc++: Improve naming and whitespace for extents.

2025-05-26 Thread Luc Grosheintz
libstdc++-v3/ChangeLog: * include/std/mdspan(__mdspan::_ExtentsStorage): Change name of private member _M_dynamic_extens to _M_dyn_exts. * include/std/mdspan(extents): Change name of private member from _M_dynamic_extents to _M_exts. * include/std/mdspan: Fi

RE: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-26 Thread Richard Biener
On Mon, 19 May 2025, Tamar Christina wrote: > > >/* Complete the target-specific cost calculations. */ > > >loop_vinfo->vector_costs->finish_cost (loop_vinfo->scalar_costs); > > >vec_prologue_cost = loop_vinfo->vector_costs->prologue_cost (); > > > @@ -12373,6 +12394,13 @@ vect_transf

[PATCH v4 2/8] libstdc++: Implement layout_left from mdspan.

2025-05-26 Thread Luc Grosheintz
Implements the parts of layout_left that don't depend on any of the other layouts. libstdc++-v3/ChangeLog: * include/std/mdspan (layout_left): New class. * src/c++23/std.cc.in: Add layout_left. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 304 +++

[PATCH v4 4/8] libstdc++: Implement layout_right from mdspan.

2025-05-26 Thread Luc Grosheintz
Implement the parts of layout_left that depend on layout_right; and the parts of layout_right that don't depend on layout_stride. libstdc++-v3/ChangeLog: * include/std/mdspan (layout_right): New class. * src/c++23/std.cc.in: Add layout_right. Signed-off-by: Luc Grosheintz --- l

[PATCH v4 0/8] Implement layouts from mdspan.

2025-05-26 Thread Luc Grosheintz
This follows up on: https://gcc.gnu.org/pipermail/libstdc++/2025-May/061572.html Note that this patch series can only be applied after merging: https://gcc.gnu.org/pipermail/libstdc++/2025-May/061653.html The important changes since v3 are: * Fixed and testsed several related overflow issues th

[pushed 1/2] c++: add cxx_dump_pretty_printer

2025-05-26 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- A class to simplify implementation of -fdump-lang-foo with support for pp_printf using %D and such. gcc/cp/ChangeLog: * cxx-pretty-print.h (class cxx_dump_pretty_printer): New. * error.cc (cxx_dump_pretty_printer): Ctor/dto

[pushed 2/2] c++: add -fdump-lang-tinst

2025-05-26 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- This patch adds a dump with a trace of template instantiations, indented based on the depth of recursive instantiation. -lineno adds the location that triggered the instantiation, -details adds non-instantiation sbustitutions. The instantia

Re: [PATCH 1/2] Match:Support signed vector SAT_ADD IMM form 1

2025-05-26 Thread Richard Biener
On Mon, May 19, 2025 at 10:42 AM Li Xu wrote: > > From: xuli > > This patch would like to support vector SAT_ADD when one of the op > is singed IMM. > > void __attribute__((noinline)) \ > vec_sat_s_add_imm_##T##_fmt_1##_##INDEX (T *out, T *op_1, unsigned limi

Re: [PATCH 1/2] Match:Support IMM=-1 for signed scalar SAT_ADD IMM form1

2025-05-26 Thread Richard Biener
On Mon, May 19, 2025 at 10:41 AM Li Xu wrote: > > From: xuli > > This patch would like to support .SAT_ADD when IMM=-1. > > Form1: > T __attribute__((noinline)) \ > sat_s_add_imm_##T##_fmt_1##_##INDEX (T x) \ > {\ > T sum

Re: [PATCH 2/4] c++/modules: Implement streaming of uncontexted TYPE_DECLs [PR98735]

2025-05-26 Thread Nathaniel Shead
On Fri, May 23, 2025 at 11:31:26AM -0400, Jason Merrill wrote: > On 5/21/25 10:15 PM, Nathaniel Shead wrote: > > Another approach would be to fix 'write_class_def' to handle these > > declarations better, but that ended up being more work and felt fragile. > > It also meant streaming a lot more inf

Re: [PATCH] testsuite: Fix pr101145inf*.c testcases [PR117494]

2025-05-26 Thread Andrew Pinski
On Mon, May 26, 2025 at 4:57 AM Christophe Lyon wrote: > > ,, > > On Mon, 26 May 2025 at 12:54, Andrew Pinski (QUIC) > wrote: > > > > > -Original Message- > > > From: Christophe Lyon > > > Sent: Monday, May 26, 2025 3:09 AM > > > To: Andrew Pinski (QUIC) > > > Cc: gcc-patches@gcc.gnu.or

Re: [PATCH] gimple-fold: Implement simple copy propagation for aggregates [PR14295]

2025-05-26 Thread Richard Biener
On Sun, May 18, 2025 at 10:58 PM Andrew Pinski wrote: > > This implements a simple copy propagation for aggregates in the similar > fashion as we already do for copy prop of zeroing. > > Right now this only looks at the previous vdef statement but this allows us > to catch a lot of cases that show

Re: [PATCH] For datarefs with big gap, split them into different groups.

2025-05-26 Thread Richard Biener
On Fri, May 16, 2025 at 4:05 AM Hongtao Liu wrote: > > It's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119181 Please mention that in the changelog. Also ... > On Fri, May 16, 2025 at 10:02 AM liuhongt wrote: > > > > The patch tries to solve miss vectorization for below case. > > > > void > >

Re: [PATCH v3 0/9] Implement layouts from mdspan.

2025-05-26 Thread Tomasz Kaminski
On Mon, May 26, 2025 at 2:20 PM Luc Grosheintz wrote: > > > On 5/26/25 13:53, Tomasz Kaminski wrote: > > On Mon, May 26, 2025 at 1:32 PM Luc Grosheintz > > > wrote: > > > >> > >> > >> On 5/26/25 11:43, Tomasz Kaminski wrote: > >>> On Mon, May 26, 2025 at 11:35 AM Luc Grosheintz < > >> luc.groshe

Re: [PATCH v3 0/9] Implement layouts from mdspan.

2025-05-26 Thread Luc Grosheintz
On 5/26/25 13:53, Tomasz Kaminski wrote: On Mon, May 26, 2025 at 1:32 PM Luc Grosheintz wrote: On 5/26/25 11:43, Tomasz Kaminski wrote: On Mon, May 26, 2025 at 11:35 AM Luc Grosheintz < luc.groshei...@gmail.com> wrote: On 5/22/25 15:21, Tomasz Kaminski wrote: For the stride and p

Re: [PATCH v3 0/9] Implement layouts from mdspan.

2025-05-26 Thread Luc Grosheintz
On 5/26/25 11:43, Tomasz Kaminski wrote: On Mon, May 26, 2025 at 11:35 AM Luc Grosheintz wrote: On 5/22/25 15:21, Tomasz Kaminski wrote: For the stride and product computation, we should perform them in Extent::size_type, not index_type. The latter may be signed, and we may hit UB in mu

Re: [PATCH v3 0/9] Implement layouts from mdspan.

2025-05-26 Thread Tomasz Kaminski
On Mon, May 26, 2025 at 1:32 PM Luc Grosheintz wrote: > > > On 5/26/25 11:43, Tomasz Kaminski wrote: > > On Mon, May 26, 2025 at 11:35 AM Luc Grosheintz < > luc.groshei...@gmail.com> > > wrote: > > > >> > >> > >> On 5/22/25 15:21, Tomasz Kaminski wrote: > >>> > >>> For the stride and product comp

Re: [PATCH] testsuite: Fix pr101145inf*.c testcases [PR117494]

2025-05-26 Thread Christophe Lyon
,, On Mon, 26 May 2025 at 12:54, Andrew Pinski (QUIC) wrote: > > > -Original Message- > > From: Christophe Lyon > > Sent: Monday, May 26, 2025 3:09 AM > > To: Andrew Pinski (QUIC) > > Cc: gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH] testsuite: Fix pr101145inf*.c testcases > > [PR117

RE: [PATCH] testsuite: Fix pr101145inf*.c testcases [PR117494]

2025-05-26 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Christophe Lyon > Sent: Monday, May 26, 2025 3:09 AM > To: Andrew Pinski (QUIC) > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] testsuite: Fix pr101145inf*.c testcases > [PR117494] > > Hi Andrew, > > On Sun, 17 Nov 2024 at 22:49, Andrew Pinski > wrote:

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

2025-05-26 Thread pan2 . li
From: Pan Li This patch would like to combine the vec_duplicate + vxor.vv to the vxor.vx. From example as below code. The related pattern will depend on the cost of vec_duplicate from GR2VR. Then the late-combine will take action if the cost of GR2VR is zero, and reject the combination if the

[PATCH v2] s390: Floating point vector lane handling

2025-05-26 Thread Juergen Christ
Since floating point and vector registers overlap on s390, more efficient code can be generated to extract FPRs from VRs. Additionally, for double vectors, more efficient code can be generated to load specific lanes. Bootstrapped and regtested on s390x. gcc/ChangeLog: * config/s390/vecto

Re: [PATCH] testsuite: Fix pr101145inf*.c testcases [PR117494]

2025-05-26 Thread Christophe Lyon
Hi Andrew, On Sun, 17 Nov 2024 at 22:49, Andrew Pinski wrote: > > Instead of doing a dg-run with a specific target check for linux. > Use signal as the effective-target since this requires the use > of ALARM signal to do the testing. > Also use check_vect in the main and renames main to main1 to

Re: [AUTOFDO] Merge profiles of clones before annotating

2025-05-26 Thread Dhruv Chawla
On 26/05/25 12:58, Jan Hubicka wrote: External email: Use caution opening links or attachments Hi, Ping? Sorry for the delay. I think I finally got auto-fdo running on my box and indeed I see that if function is cloned later, the profile is lost. There are .suffixes added before afdo pass (su

Fwd: [PATCH] testsuite: Fix up dg-do-if

2025-05-26 Thread Xi Ruoyao
I forgot to send this to the list :(. Forwarded Message From: Xi Ruoyao To: Alexandre Oliva Cc: Xi Ruoyao Subject: [PATCH] testsuite: Fix up dg-do-if Date: 05/26/25 17:59:32 The line number needs to be passed to dg-do, instead of being stripped. Fixes 'compile: syntax error

Re: [AUTOFDO] Merge profiles of clones before annotating

2025-05-26 Thread Jan Hubicka
> > > > On 26 May 2025, at 5:34 pm, Jan Hubicka wrote: > > > > External email: Use caution opening links or attachments > > > > > > Hi, > > also, please, can you add an testcase? We should have some coverage for > > auto-fdo specific issues > I was looking for this too. AFIK we dont do a

Re: [PATCH v3 0/9] Implement layouts from mdspan.

2025-05-26 Thread Tomasz Kaminski
On Mon, May 26, 2025 at 11:35 AM Luc Grosheintz wrote: > > > On 5/22/25 15:21, Tomasz Kaminski wrote: > > > > For the stride and product computation, we should perform them in > > Extent::size_type, not index_type. > > The latter may be signed, and we may hit UB in multiplying non-zero > > extent

Re: simple frm save/restore strategy (was Re: [PATCH 3/6] RISC-V: frm/mode-switch: remove dubious frm edge insertion before call_insn)

2025-05-26 Thread Robin Dapp
2. OK'ish: A bunch of testcases see more reads/writes as PRE of redundant read/writes is punted to later passes which obviously needs more work. 3. NOK: We loose the ability to instrument local RM writes - especially in the testsuite.   e.g.      a.  instrinsic setting a static RM b. get_frm

Re: [PATCH v3 0/9] Implement layouts from mdspan.

2025-05-26 Thread Luc Grosheintz
On 5/22/25 15:21, Tomasz Kaminski wrote: For the stride and product computation, we should perform them in Extent::size_type, not index_type. The latter may be signed, and we may hit UB in multiplying non-zero extents, before reaching the zero. Then I observe the following issues: 1. When

[PATCH] Fixup gcc.target/i386/vect-epilogues-5.c

2025-05-26 Thread Richard Biener
The following adjusts the expected messages after -fopt-info-vec was improved for (masked) epilogues. Pushed. * gcc.target/i386/vect-epilogues-5.c: Adjust. --- gcc/testsuite/gcc.target/i386/vect-epilogues-5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/tests

[PATCH v1 2/3] RISC-V: Add test for vec_duplicate + vxor.vv combine case 0 with GR2VR cost 0, 2 and 15

2025-05-26 Thread pan2 . li
From: Pan Li Add asm dump check test for vec_duplicate + vxor.vv combine to vxor.vx, with the GR2VR cost is 0, 2 and 15. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-1-i16.c: Add a

Re: [PATCH] expmed: Prevent non-canonical subreg generation in store_bit_field [PR118873]

2025-05-26 Thread Richard Biener
On Mon, 26 May 2025, Konstantinos Eleftheriou wrote: > In `store_bit_field_1`, when the value to be written in the bitfield > and/or the bitfield itself have vector modes, non-canonical subregs > are generated, like `(subreg:V4SI (reg:V8SI x) 0)`. If one them is > a scalar, this happens only when

[PATCH] i386: Add more forms peephole2 for adc/sbb

2025-05-26 Thread Hu, Lin1
Hi, all Enable -mapxf will change some patterns about adc/sbb. Hence gcc will raise an extra mov like movq8(%rdi), %rax adcq%rax, 8(%rsi), %rax movq%rax, 8(%rdi) rather than movq8(%rsi), %rax adcq%rax, 8(%rdi) The patch add more ki

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-05-26 Thread Richard Biener
On Fri, May 23, 2025 at 2:31 PM Alexander Monakov wrote: > > In PR 105965 we accepted a request to form FMA instructions when the > source code is using a narrow generic vector that contains just one > element, corresponding to V1SF or V1DF mode, while the backend does not > expand fma patterns fo

[PATCH] or1k: Support long jump offsets with -mcmodel=large

2025-05-26 Thread Stafford Horne
The -mcmodel=large option was originally added to handle generation of large binaries with large PLTs. However, when compiling the Linux kernel with allyesconfig the output binary is so large that the jump instruction 26-bit immediate is not large enough to store the jump offset to some symbols wh

Re: [AUTOFDO] Merge profiles of clones before annotating

2025-05-26 Thread Kugan Vivekanandarajah
> On 26 May 2025, at 5:34 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > > Hi, > also, please, can you add an testcase? We should have some coverage for > auto-fdo specific issues I was looking for this too. AFIK we dont do any testing currently.

Re: [PATCH v3 0/9] Implement layouts from mdspan.

2025-05-26 Thread Tomasz Kaminski
On Fri, May 23, 2025 at 5:25 PM Tomasz Kaminski wrote: > > > On Fri, May 23, 2025 at 4:22 PM Luc Grosheintz > wrote: > >> >> >> On 5/22/25 15:21, Tomasz Kaminski wrote: >> > Thanks for working on the patches, they look solid, comments. >> > >> > Could you prepare a separate patch to fix initiali

[PATCH] expmed: Prevent non-canonical subreg generation in store_bit_field [PR118873]

2025-05-26 Thread Konstantinos Eleftheriou
In `store_bit_field_1`, when the value to be written in the bitfield and/or the bitfield itself have vector modes, non-canonical subregs are generated, like `(subreg:V4SI (reg:V8SI x) 0)`. If one them is a scalar, this happens only when the scalar mode is different than the vector's inner mode. Th

Re: [PATCH] libstdc++: Support std::abs for 128-bit integers and floats [PR96710]

2025-05-26 Thread Tomasz Kaminski
On Fri, May 23, 2025 at 6:58 PM Jonathan Wakely wrote: > Currently we only provide std::abs(__int128) and std::abs(__float128) > for non-strict modes, i.e. -std=gnu++NN but not -std=c++NN. > > This defines those overloads for strict modes too, as a small step > towards resolving PR 96710 (which w

Re: [PATCH v2] libstdc++: Implement C++26 std::indirect [PR119152]

2025-05-26 Thread Tomasz Kaminski
On Sat, May 24, 2025 at 5:06 PM NightStrike wrote: > > > On Thu, May 22, 2025 at 08:54 Tomasz Kamiński wrote: > >> From: Jonathan Wakely >> >> This papers implements C++26 std::indirect as specified > > > “This patch”? > Indeed. I will fix it before committing. Thank you.

Re: [PATCH v1] libstdc++: Fix bug in default ctor of extents.

2025-05-26 Thread Tomasz Kaminski
On Sat, May 24, 2025 at 1:29 PM Luc Grosheintz wrote: > The array that stores the dynamic extents used to be default > initialized. The standard requires value intialization. This > commit fixes the bug and adds a test. > > libstdc++-v3/ChangeLog: > > * include/std/mdspan: Value initializ

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

2025-05-26 Thread Robin Dapp
OK, thanks. -- Regards Robin

Re: [AUTOFDO] Merge profiles of clones before annotating

2025-05-26 Thread Jan Hubicka
Hi, also, please, can you add an testcase? We should have some coverage for auto-fdo specific issues Honza 0002-AUTOFDO-Merge-profiles-of-clones-before-annotating.patch Description: 0002-AUTOFDO-Merge-profiles-of-clones-before-annotating.patch

Re: [AUTOFDO] Merge profiles of clones before annotating

2025-05-26 Thread Jan Hubicka
Hi, > Ping? Sorry for the delay. I think I finally got auto-fdo running on my box and indeed I see that if function is cloned later, the profile is lost. There are .suffixes added before afdo pass (such as openmp offloading or nested functions) and there are .suffixes added afer afdo (by ipa clonin