Re: [PATCH] internal-fn: Fix up .POPCOUNT expansion

2025-06-10 Thread Richard Biener
> Am 11.06.2025 um 00:33 schrieb Jakub Jelinek : > > Hi! > > Apparently my ranger during expansion patch broke bootstrap on > aarch64-linux, while building libsupc++, there is endless recursion > on __builtin_popcountl (x) == 1 expansion. > The hack to temporarily replace SSA_NAME_VAR of the

Re: Gimple lowering question

2025-06-10 Thread Richard Biener
> Am 10.06.2025 um 22:18 schrieb Andrew MacLeod : > >  > I had a question asked of me, and now I'm passing the buck. > > extern void *memcpy(void *, const void *, unsigned int); > extern int memcmp(const void *, const void *, unsigned int); > typedef unsigned long bits32; > typedef unsigned ch

Re: [PATCH] expand, ranger: Use ranger during expansion [PR120434]

2025-06-10 Thread Richard Biener
> Am 10.06.2025 um 19:53 schrieb Jakub Jelinek : > > On Tue, Jun 10, 2025 at 10:51:25AM -0400, Andrew MacLeod wrote: >> Edge range should be fine, and really that assert doesnt really need to be >> there. >> >> Where the issue could arise is in gimple-range-fold.cc in >> fold_using_range::ran

Re: [PATCH 1/3]middle-end: support vec_cbranch_any and vec_cbranch_all [PR118974]

2025-06-10 Thread Richard Biener
> Am 10.06.2025 um 15:51 schrieb Tamar Christina : > >  >> >> -Original Message----- >> From: Richard Biener >> Sent: Tuesday, June 10, 2025 2:12 PM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; Richard Sandiford ; >>

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-06-10 Thread Richard Biener
On Tue, Jun 10, 2025 at 3:37 PM Richard Biener wrote: > > On Mon, Jun 9, 2025 at 8:06 PM Qing Zhao wrote: > > > > > > > > > On Jun 6, 2025, at 03:31, Richard Biener > > > wrote: > > > > > > On Fri, May 30, 2025 at 5:13 PM Qing

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-06-10 Thread Richard Biener
On Mon, Jun 9, 2025 at 8:06 PM Qing Zhao wrote: > > > > > On Jun 6, 2025, at 03:31, Richard Biener wrote: > > > > On Fri, May 30, 2025 at 5:13 PM Qing Zhao wrote: > >> > >> Hi, Richard, > >> > >> Really appreciate for your su

RE: [PATCH 1/3]middle-end: support vec_cbranch_any and vec_cbranch_all [PR118974]

2025-06-10 Thread Richard Biener
On Mon, 9 Jun 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Monday, June 9, 2025 10:30 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford ; > > nd > > Subject: Re: [PATCH 1

Re: [PATCH] expand, ranger: Use ranger during expansion [PR120434]

2025-06-10 Thread Richard Biener
On Tue, 10 Jun 2025, Jakub Jelinek wrote: > On Tue, Jun 10, 2025 at 01:05:51PM +0200, Richard Biener wrote: > > With your experiment of computing ranges for everything we're good > > from the ICE point-of-view. I think there's nothing we can do to > > reassure

Re: [PATCH] expand, ranger: Use ranger during expansion [PR120434]

2025-06-10 Thread Richard Biener
(it's sth I wanted to do on GIMPLE at some point). Now, we're also interested at ranges at the point of uses of _1, so the number of verifications would explode (at least we could compare to the range at _1s definition and elide if equal). Richard. > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Re: [PATCH] Fix questionable optimization of short-circuit operators

2025-06-10 Thread Richard Biener
On Tue, Jun 10, 2025 at 10:47 AM Eric Botcazou wrote: > > Hi, > > the compiler can swap the operands of the short-circuit operators in some > cases, which can be problematic for tools like Valgrind that detect uses of > uninitialized data, and is probably counterproductive in most cases. > > The c

Re: [PATCH] expand, ranger: Use ranger during expansion [PR120434]

2025-06-10 Thread Richard Biener
On Mon, 9 Jun 2025, Jakub Jelinek wrote: > On Sun, Jun 08, 2025 at 10:49:44AM +0200, Richard Biener wrote: > > I'm also a bit nervous about this given during RTL expansion the IL is > > neither fully GIMPLE nor fully RTL. Given we do not perform many > > range queries

Re: [PATCH] forwprop: Change optimize_agr_copyprop into forward walk instead of backwards

2025-06-10 Thread Richard Biener
On Tue, Jun 10, 2025 at 2:02 AM Andrew Pinski wrote: > > On Mon, Jun 9, 2025 at 2:49 AM Richard Biener > wrote: > > > > On Sun, Jun 8, 2025 at 7:52 PM Andrew Pinski > > wrote: > > > > > > While thinking about how to implement the rest of the

Re: [PATCH] gcc: Make int n_infiles local to gcc.cc.

2025-06-10 Thread Richard Biener
On Tue, Jun 10, 2025 at 1:19 AM Robert Dubner wrote: > > In the course of stamping out cppcheck warnings, we ran across a complaint > about a "shadowed variable." > > It turns out that a variable declared in gcc/gcc/h as "extern int > n_infiles;" is used only locally in gcc/gcc/cc. > > This change

Re: [PATCH] c, c++: Save 8 bytes of memory in lang_type for non-ObjC*

2025-06-10 Thread Richard Biener
On Mon, Jun 9, 2025 at 7:28 PM Jakub Jelinek wrote: > > Hi! > > For C++26 P2786R13 I'm afraid I'll need 4 new flags on class types > in struct lang_type (1 bit for trivially_relocatable_if_eligible, > 1 for replaceable_if_eligible, 1 for not_trivially_relocatable and > 1 for not_replaceable) and t

Re: [PATCH] forwprop: Change optimize_agr_copyprop into forward walk instead of backwards

2025-06-09 Thread Richard Biener
On Sun, Jun 8, 2025 at 7:52 PM Andrew Pinski wrote: > > While thinking about how to implement the rest of the copy prop and makes > sure not > to introduce some compile time problems, optimize_agr_copyprop should be > changed > into a forwproping rather than looking backwards. Can you explain t

Re: [PATCH 1/3]middle-end: support vec_cbranch_any and vec_cbranch_all [PR118974]

2025-06-09 Thread Richard Biener
repare_cmp_insn (ops[0].value, ops[1].value, comparison2, > + size, unsignedp2, OPTAB_DIRECT, &test2, > + &mode2, optab); > + emit_cmp_and_jump_insn_1 (test2, mode2, label, > +

Re: [PATCH] vect: Use combined peeling and versioning for mutually aligned DRs

2025-06-08 Thread Richard Biener
*shared) > using_decrementing_iv_p (false), > using_select_vl_p (false), > epil_using_partial_vectors_p (false), > +allow_mutual_alignment (false), > partial_load_store_bias (0), > peeling_for_gaps (false), > peeling_for_niter (false), >

Re: [PATCH] expand: Improve store_field for `{}` stores of non mode size [PR110459]

2025-06-08 Thread Richard Biener
On Sat, Jun 7, 2025 at 9:32 PM Andrew Pinski wrote: > > On Fri, Jun 6, 2025 at 12:02 PM Andrew Pinski wrote: > > > > On Thu, Jun 5, 2025 at 11:39 PM Richard Biener > > wrote: > > > > > > On Fri, Jun 6, 2025 at 12:14 AM Andrew Pinski > > >

Re: [PATCH] math-opt: Remove special case of COND_EXPR

2025-06-08 Thread Richard Biener
On Sun, Jun 8, 2025 at 1:06 AM Andrew Pinski wrote: > > Since r13-707-g68e0063397ba82 COND_EXPR in gimple assign does > not have a special case for COND_EXPR and conditional as the first operand. > This removes the code from tree-ssa-math-opts.cc which was for that special > case. > > Bootstrappe

Re: [PATCH 2/2] phi-opt: Do limited form of cselim from phiopt [PR120533]

2025-06-08 Thread Richard Biener
On Sat, Jun 7, 2025 at 12:32 AM Andrew Pinski wrote: > > So currently cselim is limited to targets which have conditional move > and also happens later in the pipeline. This adds the limited form of cselim; > where there is only one store in the two sides and no loads after the store. > > This fix

Re: [PATCH 1/2] cselim: change how to detect no load/stores after store in single_trailing_store_in_bb

2025-06-08 Thread Richard Biener
On Sat, Jun 7, 2025 at 12:31 AM Andrew Pinski wrote: > > So the current code iterates through the uses of the vdef of the store to see > if there > is an use of the vdef inside the bb. Except in this case we know the only > usage will > be a phi node, so change the loop into calling single_imm_u

Re: [PATCH] expand: Use less costly from sign and zero extensions for values where value range says they don't have MSB set [PR120434]

2025-06-08 Thread Richard Biener
20434-2.c.jj 2025-06-06 > 11:41:49.829197752 +0200 > +++ gcc/testsuite/gcc.target/i386/pr120434-2.c2025-06-06 > 11:40:25.294236198 +0200 > @@ -0,0 +1,15 @@ > +/* PR middle-end/120434 */ > +/* { dg-do compile { target lp64 } } */ > +/* { dg-options "-O2

Re: [PATCH] expand, ranger: Use ranger during expansion [PR120434]

2025-06-08 Thread Richard Biener
; > - if (!uns1_p && get_range_pos_neg (arg1) == 1) > > + if (!uns1_p && get_range_pos_neg (arg1, stmt) == 1) > > uns1_p = true; > > int pr = get_min_precision (arg0, uns0_p ? UNSIGNED : SIGNED); > > prec0 = MIN (prec0, pr); > > --- gcc/gimple-range-edge.cc.jj 2025-01-02 20:54:32.235128454 +0100 > > +++ gcc/gimple-range-edge.cc2025-06-06 10:07:59.319876245 +0200 > > @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. > > #include "tree-cfg.h" > > #include "gimple-range.h" > > #include "value-range-storage.h" > > +#include "rtl.h" > > > > // If there is a range control statement at the end of block BB, return > > it. > > // Otherwise return NULL. > > @@ -39,6 +40,8 @@ along with GCC; see the file COPYING3. > > gimple * > > gimple_outgoing_range_stmt_p (basic_block bb) > > { > > + if (bb->flags & BB_RTL) > > +return NULL; > > gimple_stmt_iterator gsi = gsi_last_nondebug_bb (bb); > > if (!gsi_end_p (gsi)) > > { > > @@ -190,6 +193,14 @@ gimple_outgoing_range::calc_switch_range > > slot = m_range_allocator->clone (case_range); > > } > > + if (default_edge == NULL) > > +{ > > + /* During expansion the default edge could have been removed > > +if the default is unreachable. */ > > + gcc_assert (currently_expanding_to_rtl); > > + return; > > +} > > + > > vrange_storage *&slot = m_edge_table->get_or_insert (default_edge, > > &existed); > > // This should be the first call into this switch. > > gcc_checking_assert (!existed); > > --- gcc/builtins.cc.jj 2025-06-04 21:49:11.957619439 +0200 > > +++ gcc/builtins.cc 2025-06-05 10:45:51.657133855 +0200 > > @@ -3529,7 +3529,8 @@ expand_builtin_strnlen (tree exp, rtx ta > > > > wide_int min, max; > > int_range_max r; > > - get_global_range_query ()->range_of_expr (r, bound); > > + get_range_query (cfun)->range_of_expr (r, bound, > > +currently_expanding_gimple_stmt); > > if (r.varying_p () || r.undefined_p ()) > > return NULL_RTX; > > min = r.lower_bound (); > > @@ -3604,7 +3605,8 @@ determine_block_size (tree len, rtx len_ > >{ > > int_range_max r; > > tree tmin, tmax; > > - get_global_range_query ()->range_of_expr (r, len); > > + gimple *cg = currently_expanding_gimple_stmt; > > + get_range_query (cfun)->range_of_expr (r, len, cg); > > range_type = get_legacy_range (r, tmin, tmax); > > if (range_type != VR_UNDEFINED) > > { > > --- gcc/gimple-range.cc.jj 2025-02-13 19:59:55.610575474 +0100 > > +++ gcc/gimple-range.cc 2025-06-05 12:05:45.174074016 +0200 > > @@ -200,7 +200,12 @@ gimple_ranger::range_on_exit (vrange &r, > > // If this is not the definition block, get the range on the last stmt > > in > > // the block... if there is one. > > if (def_bb != bb) > > -s = last_nondebug_stmt (bb); > > +{ > > + if (bb->flags & BB_RTL) > > + s = NULL; > > + else > > + s = last_nondebug_stmt (bb); > > +} > > // If there is no statement provided, get the range_on_entry for this > > block. > > if (s) > > range_of_expr (r, name, s); > > --- gcc/testsuite/gcc.target/i386/pr120434-1.c.jj 2025-06-06 > > 11:41:46.881233965 +0200 > > +++ gcc/testsuite/gcc.target/i386/pr120434-1.c 2025-06-06 > > 11:38:26.719692788 +0200 > > @@ -0,0 +1,28 @@ > > +/* PR middle-end/120434 */ > > +/* { dg-do compile } */ > > +/* { dg-options "-O2 -mtune=generic -masm=att" } */ > > +/* { dg-final { scan-assembler-times "\tsar\[lq]\t" 2 } } */ > > +/* { dg-final { scan-assembler-times "\tshr\[lq]\t" 2 } } */ > > + > > +[[gnu::noipa]] int > > +foo (int x) > > +{ > > + return x / 200; > > +} > > + > > +[[gnu::noipa]] int > > +bar (int x) > > +{ > > + if (x < 0) > > +__builtin_unreachable (); > > + return x / 200; > > +} > > + > > +[[gnu::noipa]] int > > +baz (int x) > > +{ > > + if (x >= 0) > > +return x / 200; > > + else > > +return 24; > > +} > > > > Jakub > > > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)

Re: message format ok?

2025-06-08 Thread Richard Biener
On Fri, Jun 6, 2025 at 5:28 PM James K. Lowden wrote: > > I have committed a change to the master branch in my local repository > with the following message. Since it's my first time, before pushing, > I would like to know if there's any problem with the message itself. > > I have tried to follow

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-06 Thread Richard Biener
> Am 06.06.2025 um 17:42 schrieb Robin Dapp : > >  >> >> At first I thought if we only cared about element misalignment checking the >> first element/pointer should be sufficient. But riscv's gathers as well as >> strided loads allow byte offsets rather than element-sized offsets so there

[PATCH] Remove non-SLP path from get_[group_]load_store_type

2025-06-06 Thread Richard Biener
The following removes the non-SLP path from get_group_load_store_type and get_load_store_type. Bootstrap and regtest running on x86_64-unknown-linux-gnu. * tree-vect-stmts.cc (get_group_load_store_type): Remove non-SLP path. (get_load_store_type): Likewise. --- gcc/tree-v

[PATCH 2/3] Remove non-SLP path from vectorizable_store

2025-06-06 Thread Richard Biener
Prune unreachable paths * tree-vect-stmts.cc (vectorizable_store): Remove non-SLP paths. --- gcc/tree-vect-stmts.cc | 591 + 1 file changed, 192 insertions(+), 399 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc in

[PATCH 3/3] Remove non-SLP path from vectorizable_store

2025-06-06 Thread Richard Biener
Eliminate the toplevel ncopies and loops that become non-loops. Eliminate use of STMT_VINFO_VECTYPE. Bootstrapped and tested on x86_64-unknown-linux-gnu, will squash and push. * tree-vect-stmts.cc (vectorizable_store): Remove non-SLP paths. --- gcc/tree-vect-stmts.cc | 524 ++

[PATCH 1/3] Remove non-SLP path from vectorizable_store

2025-06-06 Thread Richard Biener
replace slp_node/slp checks with 1 * tree-vect-stmts.cc (vectorizable_store): Prune non-SLP paths. --- gcc/tree-vect-stmts.cc | 78 +- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc in

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-06 Thread Richard Biener
On Fri, Jun 6, 2025 at 1:26 PM Robin Dapp wrote: > > > In case the riscv strided vector load instruction has additional > > requirements > > on the loaded (scalar) element alignment then we'd have to implement this. > > For the moment the vectorizer will really emit scalar loads here, so that's >

[PATCH] Remove create_tmp_reg_or_ssa_name

2025-06-06 Thread Richard Biener
Now that create_tmp_reg_or_ssa_name just calls make_ssa_name replace all of its uses. Bootstrapped on x86_64-unknown-linux-gnu, built a cross to ppc64le, pushed. * gimple-fold.h (create_tmp_reg_or_ssa_name): Remove. * gimple-fold.cc (create_tmp_reg_or_ssa_name): Likewise.

GCC 12.4.1 Status Report (2025-06-06)

2025-06-06 Thread Richard Biener
Status == The gcc-12 branch open for regression and documentation fixes. We plan to close the branch with the release of GCC 12.5 where a release candidate is planned at Jul 4th and the release a week after, Jul 11th. Note that since this is going to be the last release from the branch it's e

Re: [PATCH] Fix assertion failure on small array constructor

2025-06-06 Thread Richard Biener
On Fri, Jun 6, 2025 at 10:31 AM Eric Botcazou wrote: > > Hi, > > the attached Ada testcase triggers an assertion failure in size_binop_loc: > > +===GNAT BUG DETECTED==+ > | 16.0.0 20250605 (experimental) [master r16-1173-gda96bdfff08] (x86_64-sus

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-06-06 Thread Richard Biener
On Fri, May 30, 2025 at 5:13 PM Qing Zhao wrote: > > Hi, Richard, > > Really appreciate for your suggestions. > > > On May 30, 2025, at 05:22, Richard Biener > > wrote: > > > > On Fri, May 23, 2025 at 10:49 PM Qing Zhao wrote: > >> > >>

Re: [PATCH] cselim: Update the vop manually for cond_if_else_store replacement

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 7:30 AM Andrew Pinski wrote: > > To speed up things slightly, we can do the update of the vop for the > newly inserted store manually. > This will also allow a simplified part of cselim to be used inside > phi-opt to move the store out earlier and independent of the full cse

Re: [PATCH] widening_mul: Make better use of overflowing operations in codegen of min/max(a, add/sub(a, b))

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 6:09 AM Dhruv Chawla wrote: > > On 05/06/25 12:01, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > > > > On Wed, Jun 4, 2025 at 7:44 PM Andrew Pinski wrote: > >> > >> On Wed, J

Re: [PATCH v2 1/5] emit-rtl: document next_nonnote_nondebug_insn_bb () can breach into next BB

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 2:08 AM Vineet Gupta wrote: > > gcc/ChangeLog: > > * emit-rtl.cc (next_nonnote_nondebug_insn): Update comments. > > Signed-off-by: Vineet Gupta > --- > gcc/emit-rtl.cc | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/gcc/emit-rtl.cc b/g

Re: [PATCH] expand: Improve store_field for `{}` stores of non mode size [PR110459]

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 12:14 AM Andrew Pinski wrote: > > Currently we expand `{}` and store zeros to the stack and then do a full > mode load back. This is a waste, instead we should just use the zero cst > in the mode that fits the bitsize. > > Boostrapped and tested on x86_64-linux-gnu. > Build

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-05 Thread Richard Biener
On Thu, Jun 5, 2025 at 4:44 PM Robin Dapp wrote: > > >> But that would not pass the alignment check either, no? In fact, I assume > >> that for strided loads we have a scalar type as component (ptype), so we > >> always get supported unaligned accesses here? > > > Perhaps I'm missing something, t

Re: [PATCH] i386: Improve "movcc" expander for DImode immediates [PR120553]

2025-06-05 Thread Richard Biener
predicate for operands 2 and 3 for all modes. > > gcc/testsuite/ChangeLog: > > * gcc.target/i386/pr120553.c: New test. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > Uros. > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Re: [PATCH 2/4] Use ranger for table based CTZ detection

2025-06-05 Thread Richard Biener
> Am 05.06.2025 um 15:50 schrieb Andrew MacLeod : > >  >> On 6/5/25 09:28, Richard Biener wrote: >> The following uses context sensitive ranger for determining whether >> the input to the table based CTZ is ever zero. >> >> Bootstrapped

[PATCH 4/4] tree-optimization/120032 - CLZ matching, fallback for missing range-info

2025-06-05 Thread Richard Biener
The following allows us to emit a conditional move when the value of the table based CLZ/CLZ implementation at zero differs from what the target implementation guarantees or we cannot easily fixup otherwise. In that case emit a val == 0 ? table-based-zero-result : ... Bootstrapped and tested on x

[PATCH 3/4] tree-optimization/120032 - matching of table based CLZ

2025-06-05 Thread Richard Biener
The following adds the ability to match a table based CLZ implementation similar as to how we can do for CTZ. I'm re-using the workers for matching up array and string tables by using a lambda and templates and kept the transform step for CLZ/CTZ inter-mangled. Bootstrapped and tested on x86_64-u

[PATCH 2/4] Use ranger for table based CTZ detection

2025-06-05 Thread Richard Biener
The following uses context sensitive ranger for determining whether the input to the table based CTZ is ever zero. Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-ssa-forwprop.cc (simplify_count_trailing_zeroes): Use ranger instead of tree_expr_nonzero_p. --- gcc/tree

[PATCH 1/4] Refactor CTZ detection in forwprop

2025-06-05 Thread Richard Biener
The following refactors the CTZ detection code to be more easily extensible to also handle CLZ. Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-ssa-forwprop.cc (optimize_count_trailing_zeroes): Inline into ... (simplify_count_trailing_zeroes): ... this function

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-05 Thread Richard Biener
On Thu, Jun 5, 2025 at 2:34 PM Robin Dapp wrote: > > > So I do wonder how this interacts with vector_vector_composition_type, > > in fact the difference is that for strided_load we know the composition > > happens as part of a load, so how about instead extending > > this function, pass it VLS_LOA

Re: [PATCH] tree-sra: Use MOVE_MAX for sra size limit [PR112824]

2025-06-05 Thread Richard Biener
to a target default. */ >unsigned HOST_WIDE_INT max_scalarization_size > -= get_move_ratio (optimize_speed_p) * UNITS_PER_WORD; > += get_move_ratio (optimize_speed_p) * MOVE_MAX; > >if (optimize_speed_p) > { > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Re: [PATCH] widening_mul: Make better use of overflowing operations in codegen of min/max(a, add/sub(a, b))

2025-06-04 Thread Richard Biener
On Wed, Jun 4, 2025 at 7:44 PM Andrew Pinski wrote: > > On Wed, Jun 4, 2025 at 6:27 AM Richard Biener > wrote: > > > > On Thu, May 29, 2025 at 10:04 AM wrote: > > > > > > From: Dhruv Chawla > > > > > > This patch folds the following patt

Re: [PATCH] real: Fix up real_from_integer [PR120547]

2025-06-04 Thread Richard Biener
> Am 04.06.2025 um 23:04 schrieb Jakub Jelinek : > > Hi! > > The function has 2 problems, one is _BitInt specific and the other is > most likely also reproduceable only with it. > > The first issue is that I've missed updating the function for _BitInt, > maxbitlen as MAX_BITSIZE_MODE_ANY_INT

Re: [PATCH] widening_mul: Make better use of overflowing operations in codegen of min/max(a, add/sub(a, b))

2025-06-04 Thread Richard Biener
On Thu, May 29, 2025 at 10:04 AM wrote: > > From: Dhruv Chawla > > This patch folds the following patterns: > - max (a, add (a, b)) -> [sum, ovf] = addo (a, b); !ovf ? sum : a > - max (a, sub (a, b)) -> [sum, ovf] = subo (a, b); !ovf ? a : sum > - min (a, add (a, b)) -> [sum, ovf] = addo (a, b);

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-04 Thread Richard Biener
On Tue, May 27, 2025 at 6:04 PM Robin Dapp wrote: > > From: Robin Dapp > > This patch enables strided loads for VMAT_STRIDED_SLP. Instead of > building vectors from scalars or other vectors we can use strided loads > directly when applicable. > > The current implementation limits strided loads t

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

2025-06-04 Thread Richard Biener
On Mon, Jun 2, 2025 at 8:31 AM 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 u

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

2025-06-04 Thread Richard Biener
On Thu, May 29, 2025 at 7:42 AM Andrew Pinski wrote: > > On Mon, May 26, 2025 at 1:40 PM Andrew Pinski wrote: > > > Note this is redundant store removal - I'm not sure operand_equal_p > > > is good enough to catch all cases of effective type changes done? > > > Esp. as infering the old effective

Re: [PATCH] emit-rtl: Tweak validate_subreg ordered_p condition [PR120447]

2025-06-04 Thread Richard Biener
On Mon, Jun 2, 2025 at 5:53 PM Richard Sandiford wrote: > > In the comment trail for PR119966, I'd said that the validate_subreg > condition: > > /* The outer size must be ordered wrt the register size, otherwise > we wouldn't know at compile time how many registers the outer > mode oc

Re: [PATCH v2 1/1] middle-end: Fix operation_could_trap_p for FIX_TRUNC expressions

2025-06-04 Thread Richard Biener
On Tue, Jun 3, 2025 at 4:19 PM Spencer Abson wrote: > > On Tue, Jun 03, 2025 at 03:26:40PM +0200, Richard Biener wrote: > > On Tue, Jun 3, 2025 at 3:09 PM Spencer Abson wrote: > > > > > > Floating-point to integer conversions can be inexact or invalid (e.g., >

Re: [PING][PATCH v3] match.pd: Fold (x + y) >> 1 into IFN_AVG_FLOOR (x, y) for vectors

2025-06-04 Thread Richard Biener
&& TREE_CODE (gimple_get_lhs (stmt)) == SSA_NAME) > > + || !is_constant)) > > { > >tree lhs = gimple_get_lhs (stmt); > >wide_int nonzero_bits = get_nonzero_bits (lhs); > > diff --git a/gcc/tree-ssanames.cc b/gcc/tree-ssanames.cc > > index de7b9b79f94..99613411624 100644 > > --- a/gcc/tree-ssanames.cc > > +++ b/gcc/tree-ssanames.cc > > @@ -508,6 +508,14 @@ get_nonzero_bits_1 (const_tree name) > >/* Use element_precision instead of TYPE_PRECISION so complex and > > vector types get a non-zero precision. */ > >unsigned int precision = element_precision (TREE_TYPE (name)); > > + > > + if (VECTOR_TYPE_P (TREE_TYPE (name))) > > +{ > > + tree elem = uniform_vector_p (name); > > + if (elem) > > + return get_nonzero_bits_1 (elem); > > +} > > + > >if (TREE_CODE (name) != SSA_NAME) > > return wi::shwi (-1, precision); > > > -- > > 2.43.0 > > -- > Thanks, > Pengfei > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Re: [PATCH v2 1/1] Possible inlining improvements with -Os

2025-06-04 Thread Richard Biener
On Mon, Mar 17, 2025 at 2:14 PM Aleksandar Rakic wrote: > > From: Robert Suchanek > > --param early-inlining-insns-cold=NUMBER > --param max-inline-insns-small-and-cold=NUMBER > > Analysis shows that the main difference between -O2 and -Os goes down to > inlining of cold or unlikely functions. Th

Re: [PATCH] Use MEM_EXPR only if MEM_P is true

2025-06-04 Thread Richard Biener
On Wed, Jun 4, 2025 at 7:28 AM H.J. Lu wrote: > > On s390x, for input: > > (call_insn/u 7 6 11 2 (parallel [ > (set (reg:SI 2 %r2) > (call (subreg:QI (symbol_ref:SI ("__tls_get_offset") > [flags 0x1]) 3) > (const_int 0 [0]))) > (clobber (

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
On Wed, 4 Jun 2025, Richard Sandiford wrote: > Sorry for responding late. > > Richard Biener writes: > >> > > > > > OK, so SVE VLS -msve-vector-bits=128 modes are indistinguishable > >> > > > > > from > >>

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
On Wed, 4 Jun 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Wednesday, June 4, 2025 8:34 AM > > To: Tamar Christina > > Cc: Richard Biener ; Richard Sandiford > > ; Pengfei Li ; gcc- > > patc...@gcc.gn

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
On Wed, 4 Jun 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Wednesday, June 4, 2025 8:04 AM > > To: Tamar Christina > > Cc: Richard Biener ; Richard Sandiford > > ; Pengfei Li ; gcc- > > patc...@gcc.gn

Re: [PATCH] opt: Detect the wrong case of flags option

2025-06-04 Thread Richard Biener
On Tue, Jun 3, 2025 at 9:16 PM Joseph Myers wrote: > > On Tue, 3 Jun 2025, Andrew Pinski wrote: > > > This is just a simple check to see if the flags like LangEnabledBy > > have the correct case. By putting everything into upper case and > > seeing if there is a match (if previously there was not

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
On Tue, 3 Jun 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, June 3, 2025 2:12 PM > > To: Tamar Christina > > Cc: Richard Biener ; Richard Sandiford > > ; Pengfei Li ; gcc- > > patc...@gcc.gn

[PATCH] Improve create_tmp_reg_or_ssa_name, always create SSA name

2025-06-03 Thread Richard Biener
In GIMPLE we can always use SSA names, so do that as it is cheaper. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. So now we can remove create_tmp_reg_or_ssa_name. Richard. * gimple-fold.cc (create_tmp_reg_or_ssa_name): Always create a SSA name. --- gcc/gimple-fol

Re: [PATCH v2 1/1] middle-end: Fix operation_could_trap_p for FIX_TRUNC expressions

2025-06-03 Thread Richard Biener
On Tue, Jun 3, 2025 at 3:09 PM Spencer Abson wrote: > > Floating-point to integer conversions can be inexact or invalid (e.g., due to > overflow or NaN). However, since users of operation_could_trap_p infer the > bool FP_OPERATION argument from the expression's type, the FIX_TRUNC family > are co

[PATCH] tree-optimization/120517 - fix dataref group split math

2025-06-03 Thread Richard Biener
DR_INIT is already measured in bytes, so there's no need to multiply the DR_INIT difference of two DRs by the size of one of the DRs when comparing that difference against MAX_BITSIZE_MODE_ANY_MODE. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/120517

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-03 Thread Richard Biener
On Fri, May 9, 2025 at 4:05 PM Tamar Christina wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 9, 2025 2:44 PM > > To: Tamar Christina > > Cc: Richard Sandiford ; Pengfei Li > > ; gcc-patches@gcc.gnu.org; ktkac...@n

Re: [PATCH] aarch64:sve: Use create_tmp_reg_or_ssa_name instead of create_tmp_var in the folder

2025-06-03 Thread Richard Biener
On Sun, Jun 1, 2025 at 6:57 PM Andrew Pinski wrote: > > On Sun, Jun 1, 2025 at 3:54 AM Richard Biener > wrote: > > > > On Sat, May 31, 2025 at 8:41 PM Andrew Pinski > > wrote: > > > > > > Currently gimple_folder::convert_and_fold calls create

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

2025-06-03 Thread Richard Biener
> Am 02.06.2025 um 14:16 schrieb Tamar Christina : > >  >> >> -Original Message----- >> From: Richard Biener >> Sent: Monday, May 26, 2025 2:56 PM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd >> Subject: RE: [PATCH 1/2]mi

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

2025-06-03 Thread Richard Biener
> Am 03.06.2025 um 09:26 schrieb Richard Biener : > >  > >> Am 02.06.2025 um 14:16 schrieb Tamar Christina : >> >>  >>> >>> -----Original Message- >>> From: Richard Biener >>> Sent: Monday, May 26, 2025 2:56 PM >>

Re: [PATCH] phiprop: Add testcase for already fixed case [PR116824]

2025-06-02 Thread Richard Biener
> Am 03.06.2025 um 05:59 schrieb Andrew Pinski : > > This testcase was fixed by r16-906-g8da568c885dc90. Since > this is a C testcase, it would be useful to have a C testcase besides > a C++ one too. > > Tested for x86_64-linux-gnu. Ok Richard >PR tree-optimization/116824 > > gcc/tes

Re: [PATCH] switch-conversion: Mark CSWTCH as mergeable [PR120451]

2025-06-02 Thread Richard Biener
> Am 03.06.2025 um 04:51 schrieb Andrew Pinski : > > When we have a smallish CSWTCH, it could be placed in the rodata.cst16 > section so it can be merged with other constants across TUs. > > The fix is simple; just mark the decl as mergable (DECL_MERGEABLE). > DECL_MERGEABLE was added with r1

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-06-01 Thread Richard Biener
On Sun, Jun 1, 2025 at 12:54 PM Eric Botcazou wrote: > > > If one wants to look up something in symbol table during late optimization > > one is supposed to check that ::get does not return NULL and be conservative > > otheriwse. So your change for PR120156 was OK with me, but I did not > > expli

Re: [PATCH] Move get_call_rtx_from to final.c

2025-06-01 Thread Richard Biener
On Sun, Jun 1, 2025 at 9:14 AM H.J. Lu wrote: > > Move get_call_rtx_from to final.c and call call_from_call_insn. > > PR other/120493 > * final.cc (call_from_call_insn): Change the argument type to > const rtx_call_insn *. > (get_call_rtx_from): New. > * rtl.h (is_a_helper ::test): New. > (get_cal

Re: [PATCH] aarch64:sve: Use create_tmp_reg_or_ssa_name instead of create_tmp_var in the folder

2025-06-01 Thread Richard Biener
On Sat, May 31, 2025 at 8:41 PM Andrew Pinski wrote: > > Currently gimple_folder::convert_and_fold calls create_tmp_var; that means > while in ssa form, > the pass which calls fold_stmt will always have to update the ssa (via > TODO_update_ssa or otherwise). > This seems not very useful since we

Re: [PATCH] forwprop: Manually rename the virtual mem op for complex and vector loads prop

2025-06-01 Thread Richard Biener
> Am 01.06.2025 um 04:16 schrieb Andrew Pinski : > > There are two places which forwprop replaces an original load to a few > different loads. > Both can set the vuse manually instead of relying on update_ssa. > One is doing a complex load followed by REAL/IMAG_PART only > And the other is ve

Re: [PATCH] DCE: Only set TODO_update_ssa when cfg has changed

2025-05-31 Thread Richard Biener
> Am 31.05.2025 um 18:29 schrieb Andrew Pinski : > > SSA form is kept up to date except for VOPs when CFG was removed > so only set update ssa TODO if the CFG has changed. This is still > sets the TODO in more cases than it is needed but it reduces enough > to make difference. > > Bootstrappd

Re: [PATCH] CCP: Manually rename the virtual mem op when inserting clobbers

2025-05-31 Thread Richard Biener
On Sat, May 31, 2025 at 11:07 AM Andrew Pinski wrote: > > Right now the only place where CCP needs to have the virtual op renamed is > after inserting clobbers which come right before __builtin_stack_restore. > So let's manually do the correct thing so we can remove the TODO_update_ssa > todo. O

Re: [PATCH] Have TODO_verify_* not set by any pass

2025-05-31 Thread Richard Biener
On Sat, May 31, 2025 at 4:17 AM Andrew Pinski wrote: > > This is a follow up to the patch set starting at > https://gcc.gnu.org/pipermail/gcc-patches/2014-April/386650.html. > > Currently TODO_verify_{il,all} is set by a few passes as TODOs afterwards but > we don't need to do that any more. Thos

[PATCH] tree-optimization/120457 - avoid lowering of some single-element interleave

2025-05-30 Thread Richard Biener
The following makes sure we are not lowering single-element interleaving schemes in a way that defeats load vectorizing later but allows the VMAT_ELEMENTWISE fallback to be used. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/120457 * tree-vect-s

[PATCH] tree-optimization/120357 - ICE with early break vectorization

2025-05-30 Thread Richard Biener
When doing early break vectorization of a loop with a conditional reduction the epilog creation code is confused as to before which exit to insert the conditional reduction induction IV update. The following make sure this is done before the main IV exit. Bootstrapped and tested on x86_64-unknown

[PATCH] tree-optimization/120341 - stores into STRING_CSTs can trap

2025-05-30 Thread Richard Biener
The following fixes conditional store elimination and store motion so they consider stores to STRING_CSTs as trapping. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/120341 * tree-ssa-loop-im.cc (can_sm_ref_p): STRING_CSTs are readonly. *

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-05-30 Thread Richard Biener
On Fri, May 30, 2025 at 11:30 AM Jan Hubicka wrote: > > Hi, > > > > > > Hi, > > > > > > the attached Ada testcase compiled with -O2 -gnatn makes the compiler > > > crash in > > > vect_can_force_dr_alignment_p during SLP vectorization: > > > > > > if (decl_in_symtab_p (decl) > > > && !symt

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-05-30 Thread Richard Biener
On Fri, May 23, 2025 at 10:49 PM Qing Zhao wrote: > > Hi, Richard, > > Thanks a lot for your comments and questions. > Please see my answers embedded below: > > > On May 19, 2025, at 06:44, Richard Biener > > wrote: > > > > On Fri, May 16, 2025 at 3

Re: [PATCH] scc_copy: conditional return TODO_cleanup_cfg.

2025-05-29 Thread Richard Biener
On Fri, May 30, 2025 at 3:53 AM Andrew Pinski wrote: > > Only have cleanup cfg happen if scc copy did some proping. > This should be a small compile time improvement by not doing cleanup > cfg if scc copy does nothing. > > Also removes TODO_update_ssa since it should not be needed. OK. Richard.

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

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 11:48 PM Andrew Pinski wrote: > > On Tue, May 27, 2025 at 5:14 AM Richard Biener > wrote: > > > > On Tue, May 27, 2025 at 5:02 AM Andrew Pinski > > wrote: > > > > > > This was noticed in the review of copy propagation for ag

Re: [PATCH] rtl-ssa: Reject non-address uses of autoinc regs [PR120347]

2025-05-29 Thread Richard Biener
On Wed, May 28, 2025 at 6:55 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Thu, May 22, 2025 at 12:19 PM Richard Sandiford > > wrote: > >> > >> As the rtl.texi documentation of RTX_AUTOINC expressions says: > >> > >> If

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 11:38 AM Eric Botcazou wrote: > > Hi, > > the attached Ada testcase compiled with -O2 -gnatn makes the compiler crash in > vect_can_force_dr_alignment_p during SLP vectorization: > > if (decl_in_symtab_p (decl) > && !symtab_node::get (decl)->can_increase_alignment_p

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

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 12:27 PM Konstantinos Eleftheriou wrote: > > Hi Richard, thanks for the response. > > On Mon, May 26, 2025 at 11:55 AM Richard Biener wrote: > > > > On Mon, 26 May 2025, Konstantinos Eleftheriou wrote: > > > > > In `store_bit_field_

Re: [PATCH] c++tools: Don't check --enable-default-pie.

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 8:06 AM Kito Cheng wrote: > > `--enable-default-pie` is an option to specify whether to enable > position-independent executables by default for `target`. > > However c++tools is build for `host`, so it should just follow > `--enable-host-pie` option to determine whether to

Re: [PATCH] ggc-page: Fix up build on non-USING_MMAP hosts [PR120464]

2025-05-29 Thread Richard Biener
> Am 29.05.2025 um 08:28 schrieb Jakub Jelinek : > > On Tue, Apr 22, 2025 at 01:27:34PM +0200, Richard Biener wrote: >> This is OK for trunk after we've released GCC 15.1. > > This change broke build on non-USING_MMAP hosts. > I don't have access to one, so

Re: [PATCH v3 2/2] gimple-fold: extend vector simplification to match scalar bitwise optimizations [PR119196]

2025-05-28 Thread Richard Biener
xpand_vec_cmp_expr_p (TREE_TYPE (@1), type, LT_EXPR > (lt @c0 (convert @1))) > ``` > ...applied across all expressions? Yes, this is what I would suggest. Richard. > Kind Regards, > Icen > > > From: Richard Biener > Sent:

Re: Defuse 'RESULT_DECL' check in 'pass_nrv' for offloading compilation [PR119835] (was: Disable 'pass_nrv' for offloading compilation [PR119835])

2025-05-28 Thread Richard Biener
On Wed, 28 May 2025, Thomas Schwinge wrote: > Hi! > > On 2025-05-28T09:18:29+0200, Richard Biener wrote: > > On Tue, 27 May 2025, Thomas Schwinge wrote: > >> "'GIMPLE_RETURN' vs. 'RESULT_DECL' if 'aggregate_value_p'" isn't ac

Re: [PATCH v2 2/3] vect: Remove non-SLP paths in strided slp/elementwise.

2025-05-28 Thread Richard Biener
On Tue, May 27, 2025 at 6:02 PM Robin Dapp wrote: > > This removes the non-SLP paths that were made unreachable in the > previous patch. This short series is OK. Please squash the two commits before pushing. Thanks, Richard. > gcc/ChangeLog: > > * tree-vect-stmts.cc (vectorizable_load)

Re: Disable 'pass_nrv' for offloading compilation [PR119835] (was: [PATCH] Verify 'GIMPLE_RETURN' vs. 'RESULT_DECL' if 'aggregate_value_p' [PR119835])

2025-05-28 Thread Richard Biener
On Tue, 27 May 2025, Thomas Schwinge wrote: > Hi! > > On 2025-05-23T17:01:31+0200, Richard Biener wrote: > > Am 23.05.2025 um 16:49 schrieb Thomas Schwinge : > >> This fell out of me looking into PR119835. This doesn't resolve the > >> underlying >

Re: [PATCH v3 2/2] gimple-fold: extend vector simplification to match scalar bitwise optimizations [PR119196]

2025-05-27 Thread Richard Biener
\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" > "original" } } */ > +/* { dg-final { scan-tree-dump > ".*\\*tD\\.\\d+\\s*=\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*;" "original" } } */ > +/* { dg-final { scan-tree-dump > ".*\\*zD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*!=\\s*VIEW_CONVERT_EXPR\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" > "original" } } */ > +/* { dg-final { scan-tree-dump > ".*\\*tD\\.\\d+\\s*=\\s*VEC_COND_EXPR\\s*<\\s*\\*xD\\.\\d+\\s*>=\\s*VIEW_CONVERT_EXPR\\(\\*yD\\.\\d+\\)\\s*,\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*,\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*>\\s*;" > "original" } } */ > +/* { dg-final { scan-tree-dump > ".*\\*zD\\.\\d+\\s*=\\s*\\{\\s*-1(,\\s*-1){3}\\s*\\}\\s*;" "original" } } */ > +/* { dg-final { scan-tree-dump > ".*\\*tD\\.\\d+\\s*=\\s*\\{\\s*0(,\\s*0){3}\\s*\\}\\s*;" "original" } } */ > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

[PATCH] tree-optimization/117965 - phiprop validity checking is too strict

2025-05-27 Thread Richard Biener
The PR shows that when using std::clamp from the C++ standard library and there is surrounding code using exceptions then phiprop can fail to simplify the code so phiopt can turn the clamping into efficient min/max operations. The validation code is needlessly complicated, steming from the time we

Re: [PATCH 2/2] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-05-27 Thread Richard Biener
On Tue, May 27, 2025 at 2:53 PM Robin Dapp wrote: > > > On Tue, May 27, 2025 at 2:44 PM Robin Dapp wrote: > >> > >> > This mangles in the non-SLP path removal, can you please separate that > >> > out? > >> > >> So should patch 1/2 do more than it does, i.e. fully remove the non-slp > >> paths rat

Re: [PATCH 2/2] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-05-27 Thread Richard Biener
On Tue, May 27, 2025 at 2:44 PM Robin Dapp wrote: > > > This mangles in the non-SLP path removal, can you please separate that > > out? > > So should patch 1/2 do more than it does, i.e. fully remove the non-slp > paths rather than just if (0) them? There should be a separate 2/3 that does this,

Re: [PATCH] Fix IPA-SRA issue with reverse SSO on specific pattern

2025-05-27 Thread Richard Biener
On Tue, May 27, 2025 at 2:40 PM Martin Jambor wrote: > > Hi, > > On Wed, May 21 2025, Eric Botcazou wrote: > > Hi, > > > > IPA-SRA generally works fine in the presence of reverse Scalar_Storage_Order > > by propagating the relevant flag onto the newly generated MEM_REFs. However > > we have been

  1   2   3   4   5   6   7   8   9   10   >