RE: [PATCH]middle-end: Fix peeled vect loop IV values.

2023-12-06 Thread Richard Biener
On Wed, 6 Dec 2023, Tamar Christina wrote: > > > Hi All, > > > > > > While waiting for reviews I found this case where both loop exit needs to > > > go to > > > epilogue loop, but there was an IV related variable that was used in the > > > scalar > > > iteration as well. > > > > > >

Re: [PATCH 12/21]middle-end: Add remaining changes to peeling and vectorizer to support early breaks

2023-12-06 Thread Richard Biener
On Mon, 6 Nov 2023, Tamar Christina wrote: > Hi All, > > This finishes wiring that didn't fit in any of the other patches. > Essentially just adding related changes so peeling for early break works. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? > >

Re: [PATCH 13/21]middle-end: Update loop form analysis to support early break

2023-12-06 Thread Richard Biener
On Mon, 6 Nov 2023, Tamar Christina wrote: > Hi All, > > This sets LOOP_VINFO_EARLY_BREAKS and does some misc changes so the other > patches are self contained. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? > > Thanks, > Tamar > > gcc/ChangeLog: > >

Re: [PATCH]middle-end: Fix peeled vect loop IV values.

2023-12-06 Thread Richard Biener
eeds to be treated the same as the alternative > + exits in that we leave their updates to vectorizable_live_operations. > + */ > + if (!LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo)) > + vect_update_ivs_after_vectorizer (loop_vinfo, niters_vector_mult_vf, > +

Re: [PATCH]middle-end: correct loop bounds for early breaks and peeled vector loops

2023-12-06 Thread Richard Biener
> + if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo) > + && vf.is_constant ()) > + bound += vf.to_constant (); > /* -1 to convert loop iterations to latch iterations. */ > record_niter_bound (epilog, bound - 1, false, true); > scale_loo

Re: [PATCH] build: unbreak bootstrap on uclinux targets [PR112762]

2023-12-06 Thread Richard Biener
On Tue, Dec 5, 2023 at 7:50 PM Marek Polacek wrote: > > Tested with .../configure --target=c6x-uclinux [...] && make all-gcc, > ok for trunk? OK > -- >8 -- > Currently, cross-compiling with --target=c6x-uclinux (and several other) > fails due to: > > ../../src/gcc/config/linux.h:221:45: error:

Re: [PATCH] i386: Mark Xeon Phi ISAs as deprecated

2023-12-05 Thread Richard Biener
On Wed, Dec 6, 2023 at 3:33 AM Jiang, Haochen wrote: > > > -Original Message- > > From: Jiang, Haochen > > Sent: Friday, December 1, 2023 4:51 PM > > To: Richard Biener > > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao ; > > ubiz...@gmail.com > >

Re: [gcc15] nested functions in C

2023-12-05 Thread Richard Biener
On Tue, Dec 5, 2023 at 10:16 PM Martin Uecker wrote: > > Am Dienstag, dem 05.12.2023 um 21:08 + schrieb Joseph Myers: > > On Mon, 4 Dec 2023, Martin Uecker wrote: > > > > > > The key feature of lambdas (which failed to make it into C23) for this > > > > purpose is that you can't convert them

Re: [PATCH] lower-bitint: Fix arithmetics followed by extension by many bits [PR112809]

2023-12-05 Thread Richard Biener
c 2023-12-05 19:00:14.599735086 +0100 > @@ -0,0 +1,23 @@ > +/* PR tree-optimization/112809 */ > +/* { dg-do compile { target bitint } } */ > +/* { dg-options "-O2" } */ > + > +#if __BITINT_MAXWIDTH__ >= 512 > +_BitInt (512) a; > +_BitInt (256) b; > +_BitInt (256) c; > +

[PATCH] middle-end/112860 - -fgimple can skip ISEL

2023-12-05 Thread Richard Biener
The following makes sure we don't skip ISEL. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Will push, Richard. PR middle-end/112860 * passes.cc (should_skip_pass_p): Do not skip ISEL. --- gcc/passes.cc | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH] sanitizer/111736 - skip ASAN for globals in alternate address-space

2023-12-05 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard. PR sanitizer/111736 * asan.cc (asan_protect_global): Do not protect globals in non-generic address-space. --- gcc/asan.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/asan.cc

[PATCH] ipa/92606 - IPA ICF merging variables in different address-space

2023-12-05 Thread Richard Biener
The following aovids merging variables that are put in different address-spaces. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR ipa/92606 * ipa-icf.cc (sem_variable::equals_wpa): Compare address-spaces. --- gcc/ipa-icf.cc | 4 1 file changed, 4

[PATCH] middle-end/112830 - avoid gimplifying non-default addr-space assign to memcpy

2023-12-05 Thread Richard Biener
The following avoids turning aggregate copy involving non-default address-spaces to memcpy since that is not prepared for that. GIMPLE verification no longer accepts WITH_SIZE_EXPR in aggregate copies, the following re-allows that for the RHS. I also needed to adjust one assert in DCE.

[PATCH] tree-optimization/112856 - fix LC SSA after loop header copying

2023-12-05 Thread Richard Biener
When loop header copying unloops loops we have to possibly fixup LC SSA. I've take the opportunity to streamline the unloop_loops API, removing the use of a ivcanon local global variable. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/109689 PR

Re: [PATCH] driver: Fix bootstrap with --enable-default-pie

2023-12-05 Thread Richard Biener
:43.272316590 +0100 > +++ gcc/gcc.cc2023-12-05 11:47:54.046202161 +0100 > @@ -4617,6 +4617,7 @@ driver_handle_option (struct gcc_options >/* -pie is turned on by default. */ >validated = true; > #endif > + /* FALLTHROUGH */ > case OPT_r: >

Re: [PATCH] expmed: Perform mask extraction via QImode [PR112773].

2023-12-05 Thread Richard Biener
On Tue, 5 Dec 2023, Robin Dapp wrote: > > But how do we know BImode fits in QImode? > > I was kind of hoping that a "bit" always fits in a "byte"/unit > but yeah, I guess we don't always know :/ But the "bit" is of constant size, so we could choose a fitting mode? > > I think the issue is more

Re: [RFC PATCH 1/1] nix: add a simple flake nix shell

2023-12-05 Thread Richard Biener
On Tue, Dec 5, 2023 at 5:26 AM Eli Schwartz wrote: > > On 12/4/23 9:01 PM, Vincenzo Palazzo wrote: > > On Tue, Dec 5, 2023 at 2:54 AM Jeff Law wrote: > >> Distro build procedures are not something the GCC project generally gets > >> involved with. > > > > I see, but to me, this do not look like

[PATCH] tree-optimization/112843 - update_stmt doing wrong things

2023-12-05 Thread Richard Biener
The following removes range_query::update_stmt and its single invocation from update_stmt_operands. That function is not supposed to look beyond the raw stmt contents of the passed stmt since there's no guarantee about the rest of the IL. I've successfully bootstrapped & tested the

Re: [PATCH] lower-bitint: Make temporarily wrong IL less wrong [PR112843]

2023-12-05 Thread Richard Biener
); > for (unsigned int i = 0; i < nops; ++i) > --- gcc/testsuite/gcc.dg/bitint-47.c.jj 2023-12-04 14:53:19.784200724 > +0100 > +++ gcc/testsuite/gcc.dg/bitint-47.c 2023-12-04 14:42:07.251699994 +0100 > @@ -0,0 +1,13 @@ > +/* PR tree-optimization/112843 */ > +/

RE: [PATCH] tree-optimization/112827 - corrupt SCEV cache during SCCP

2023-12-05 Thread Richard Biener
../gcc/gcc/passes.cc:1687 > 0x16e68b0 execute_todo > ../../../../gcc/gcc/passes.cc:2142 > > Pan > > -Original Message- > From: Richard Biener > Sent: Monday, December 4, 2023 7:54 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] tree-optimization/1128

[PATCH] tree-optimization/112827 - more SCEV cprop fixes

2023-12-04 Thread Richard Biener
The insert iteration can be corrupted by foldings of replace_uses_by, within this particular PHI replacement but also with subsequent ones. Recompute the insert location before insertion instead. This fixes an obvserved ICE of gcc.dg/tree-ssa/ssa-sink-16.c. Bootstrapped and tested on

[PATCH] middle-end/112785 - guard against last_clique overflow

2023-12-04 Thread Richard Biener
The PR shows that we'll ICE eventually when last_clique wraps. The following avoids this by refusing to hand out new cliques after exhausting them. We then use zero (no clique) as conservative fallback. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/112785

Re: [PATCH 1/3] MATCH: Fix zero_one_valued_p's convert pattern

2023-12-04 Thread Richard Biener
On Sat, Dec 2, 2023 at 7:38 AM Andrew Pinski wrote: > > While working on PR 111972, I was getting a regression > due to zero_one_valued_p matching a signed 1 bit integer > when it came to convert. This patch fixes that by checking > the outer type too. > > Bootstrapped and tested on

Re: [PATCH 3/3] MATCH: (convert)(zero_one !=/== 0/1) for outer type and zero_one type are the same

2023-12-04 Thread Richard Biener
On Sat, Dec 2, 2023 at 7:38 AM Andrew Pinski wrote: > > When I moved two_value to match.pd, I removed the check for the {0,+-1} > as I had placed it after the {0,+-1} case for cond in match.pd. > In the case of {0,+-1} and non boolean, before we would optmize those > case to just `(convert)a` but

Re: [PATCH] expmed: Perform mask extraction via QImode [PR112773].

2023-12-04 Thread Richard Biener
nd_operand ops[3]; > > - create_output_operand ([0], target, innermode); > + create_output_operand ([0], target, extract_mode); > ops[0].target = 1; > create_input_operand ([1], op0, outermode); > create_integer_operand ([2], pos); > diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/pr112773.c > b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/pr112773.c > new file mode 100644 > index 000..5f7374b0040 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/pr112773.c > @@ -0,0 +1,20 @@ > +/* { dg-do compile } */ > +/* { dg-additional-options "-march=rv32gcv_zvl256b -mabi=ilp32d -O3" } */ > + > +long long a; > +int b, c; > +int *d; > +void e(unsigned f) { > + for (;; ++c) > +if (f) { > + a = 0; > + for (; a <= 3; a++) { > +f = 0; > +for (; f <= 0; f++) > + if ((long)a) > +break; > + } > + if (b) > +*d = f; > +} > +} > -- 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] Don't vectorize when vector stmts are only vec_contruct and stores

2023-12-04 Thread Richard Biener
On Mon, Dec 4, 2023 at 6:32 AM liuhongt wrote: > > .i.e. for below cases. >a[0] = b1; >a[1] = b2; >.. >a[n] = bn; > > There're extra dependences when contructing the vector, but not for > scalar store. According to experiments, it's generally worse. > > The patch adds an cut-off

[PATCH] tree-optimization/112818 - re-instantiate vector type size check for bswap

2023-12-04 Thread Richard Biener
For __builtin_bswap vectorization we still require an equal vector type size. Re-instantiate that check. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112818 * tree-vect-stmts.cc (vectorizable_bswap): Check input and output vector

[PATCH] c/89270 - honor registered_builtin_types in type_for_size

2023-12-04 Thread Richard Biener
The following fixes the intermediate conversions inserted by convert_to_integer when facing address-spaces and converts to their effective [u]intptr_t when they are registered_builtin_types by considering those also from c_common_type_for_size and not only from c_common_type_for_mode. Bootstrap

Re: [PATCH] gettext: disable install, docs targets, libasprintf, threads

2023-12-04 Thread Richard Biener
On Sat, Dec 2, 2023 at 5:03 PM Arsen Arsenović wrote: > > This fixes issues reported by David Edelsohn , and by > Eric Gallager . > > ChangeLog: > > * Makefile.def (gettext): Disable (via missing) > {install-,}{pdf,html,info,dvi} and TAGS targets. Set no_install > to

Re: [PATCH] download_prerequisites: add --only-gettext

2023-12-04 Thread Richard Biener
On Sat, Dec 2, 2023 at 4:53 PM Arsen Arsenović wrote: > > contrib/ChangeLog: > > * download_prerequisites > : Parse --only-gettext. > (echo_archives): Check only_gettext and stop early if true. > (helptext): Document --only-gettext. > --- > Afternoon, > > This

[PATCH] c/86869 - preserve address-space info when building qualified ARRAY_TYPE

2023-12-04 Thread Richard Biener
The following adjusts the C FE specific qualified type building to preserve address-space info also for ARRAY_TYPE. Bootstrap / regtest running on x86_64-unknown-linux-gnu, OK? Thanks, Richard. PR c/86869 gcc/c/ * c-typeck.cc (c_build_qualified_type): Preserve address-space

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-12-04 Thread Richard Biener
On Sat, 2 Dec 2023, Hans-Peter Nilsson wrote: > > Date: Fri, 1 Dec 2023 08:07:14 +0100 (CET) > > From: Richard Biener > > > On Fri, 1 Dec 2023, Hans-Peter Nilsson wrote: > > > > > > From: Hans-Peter Nilsson > > > > Date: Thu, 30

[PATCH] tree-optimization/112827 - corrupt SCEV cache during SCCP

2023-12-04 Thread Richard Biener
The following avoids corrupting the SCEV cache by my last change to propagate constant final values immediately. The easiest fix is to keep a dead initialization around. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112827 *

[PATCH 2/2] middle-end/112830 - avoid gimplifying non-default addr-space assign to memcpy

2023-12-04 Thread Richard Biener
The following avoids turning aggregate copy or initialization involving non-default address-spaces to memcpy or memset since they are not prepared for that. GIMPLE verification no longer(?) accepts WITH_SIZE_EXPR in aggregate copies, the following re-allows that. Sofar untested, will test on

[PATCH 1/2][RFC] middle-end/112830 - memcpy expansion drops address-spaces

2023-12-04 Thread Richard Biener
The following makes sure we are not losing address-space info when expanding a __builtin_memcpy (synthesized by gimplification, which _might_ be the other actual problem). The issue is with get_memory_rtx which is also used by other builtin expansions but is not aware of address-spaces. The

Re: [PATCH] testsuite: Fix up gcc.target/aarch64/pr112406.c for modern C [PR112406]

2023-12-03 Thread Richard Biener
> Am 03.12.2023 um 19:32 schrieb Jakub Jelinek : > > On Fri, Nov 17, 2023 at 02:04:01PM +0100, Robin Dapp wrote: >>> Yes, your version is also OK. >> >> The attached was bootstrapped and regtested on aarch64, x86 and >> regtested on riscv. Going to commit it later unless somebody objects. >

Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Richard Biener
> Am 02.12.2023 um 14:15 schrieb Richard Sandiford : > > Eric Botcazou writes: >>> So sorry to be awkward, but I don't think this is the way to go. I think >>> we'll just end up playing whack-a-mole and adding df_note_add_problem to >>> lots of passes. >> >> We have doing that for the past

Re: [PATCH] lower-bitint: Fix up lower_addsub_overflow [PR112807]

2023-12-02 Thread Richard Biener
> Am 02.12.2023 um 12:05 schrieb Jakub Jelinek : > > Hi! > > lower_addsub_overflow uses handle_cast or handle_operand to extract current > limb from the operands. Both of those functions heavily assume that they > return a large or huge BITINT_TYPE. The problem in the testcase is that >

Re: [PATCH] hardcfr: make builtin_return tests more portable [PR112334]

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 1:58 PM Alexandre Oliva wrote: > > > Rework __builtin_return tests to explicitly call __builtin_apply and > use its return value rather than anything else. Also require > untyped_assembly. Avoid the noise out of exceptions escaping the > builtin-applied function, but add

Re: [PATCH] Take register pressure into account for vec_construct/scalar_to_vec when the components are not loaded from memory.

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 3:39 AM liuhongt wrote: > > > Hmm, I would suggest you put reg_needed into the class and accumulate > > over all vec_construct, with your patch you pessimize a single v32qi > > over two separate v16qi for example. Also currently the whole block is > > gated with

Re: [PATCH] Fix ambiguity between vect_get_vec_defs with/without vectype

2023-12-01 Thread Richard Biener
On Fri, 1 Dec 2023, Richard Sandiford wrote: > Richard Biener writes: > > When querying a single set of vector defs with the overloaded > > vect_get_vec_defs API then when you try to use the overload with > > the vector type specified the call will be ambiguous with th

Re: [PATCH] testsuite: Tweak some further tests for modern C changes

2023-12-01 Thread Richard Biener
e/pr83126.c.jj2020-01-12 > 11:54:37.438397944 +0100 > +++ gcc/testsuite/gcc.dg/graphite/pr83126.c 2023-12-01 12:20:42.045695863 > +0100 > @@ -12,7 +12,7 @@ ew (unsigned short int c9, int stuff) > int *fd = > >*fd = c9; > - fd = *fd; > +

[PATCH] Fix ambiguity between vect_get_vec_defs with/without vectype

2023-12-01 Thread Richard Biener
When querying a single set of vector defs with the overloaded vect_get_vec_defs API then when you try to use the overload with the vector type specified the call will be ambiguous with the variant without the vector type. The following fixes this by re-ordering the vector type argument to come

Re: [PATCH] gcov: Fix use of __LIBGCC_HAVE_LIBATOMIC

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 9:19 AM Sebastian Huber wrote: > > libgcc/ChangeLog: OK. > PR target/112777 > > * libgcov.h (GCOV_SUPPORTS_ATOMIC): Honor that > __LIBGCC_HAVE_LIBATOMIC is > always defined as either 0 or 1. > --- > libgcc/libgcov.h | 2 +- > 1 file changed, 1

Re: [PATCH] lower-bitint: Fix lowering of middle sized _BitInt operations which can throw [PR112770]

2023-12-01 Thread Richard Biener
+1,11 @@ > +/* PR middle-end/112770 */ > +/* { dg-do compile { target bitint128 } } */ > +/* { dg-options "-std=c23 -fnon-call-exceptions" } */ > + > +void > +foo (void) > +{ > + _BitInt(128) a = 0; > + a /= 0;/* { dg-warning "division by zero" } */ &

Re: [PATCH] lower-bitint: Fix up handle_operand_addr for 0 constants [PR112771]

2023-12-01 Thread Richard Biener
-options "-std=c23" } */ > + > +_BitInt(575) > +foo (_BitInt(575) a) > +{ > + a /= 0;/* { dg-warning "division by zero" } */ > + return a; > +} > > 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] i386: Mark Xeon Phi ISAs as deprecated

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 8:34 AM Jiang, Haochen wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Friday, December 1, 2023 3:04 PM > > To: Jiang, Haochen > > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao ; > > ubiz...@gmail.com >

Re: [PATCH] lower-bitint: Fix up maximum addition/subtraction/multiplication result computations

2023-12-01 Thread Richard Biener
0 : prec0, > prec1 < 0 ? -prec1 : prec1); >prec3 = MAX (prec3, prec); > @@ -4201,8 +4235,9 @@ bitint_large_huge::lower_mul_overflow (t >arg0 = handle_operand_addr (arg0, stmt, NULL, ); >arg1 = handle_operand_addr (arg1, stmt, NULL, ); >int prec2 = ((prec0

Re: [PATCH] lower-bitint: Fix ICE on bitint-39.c

2023-11-30 Thread Richard Biener
else > g = gimple_build_assign (lhs2, NOP_EXPR, ovf); > gsi_replace (, g, true); > + if (gsi_stmt (m_gsi) == use_stmt) > + m_gsi = gsi_for_stmt (g); > break; > } > } > > Jakub > > -- Richard

Re: [PATCH] lower-bitint: Fix _BitInt .{ADD,SUB}_OVERFLOW lowering [PR112750]

2023-11-30 Thread Richard Biener
512) c = 0x7fffffffwb + > (_BitInt(512)) 1; > +_BitInt(512) d = 0x7fffwb; > +#endif > + > +int > +main () > +{ > +#if __BITINT_MAXWIDTH__ >= 256 > + if (!__builtin_sub_overflow_p (a, 0, 0)) > +__builtin_abort (); > + if (!__builtin_sub_overflow_p (b, -1, 0)) > +__builtin_abort (); > +#endif > +#if __BITINT_MAXWIDTH__ >= 512 > + if (!__builtin_sub_overflow_p (c, 0, (_BitInt(160)) 0)) > +__builtin_abort (); > + if (!__builtin_sub_overflow_p (d, -1, 0)) > +__builtin_abort (); > +#endif > + return 0; > +} > > 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 v2] doc: Update the status of build directory not fully separated

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 2:42 PM Xi Ruoyao wrote: > > Recently there are some people building GCC with srcdir == objdir and > the attempts just failed [1]. So stop to say "it should work". OTOH > objdir as a subdirectory of srcdir works: we've built GCC in LFS [2] > and BLFS [3] this way for

Re: Ping: [PATCH] Allow target attributes in non-gnu namespaces

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 3:12 PM Richard Sandiford wrote: > > Ping OK. Thanks, Richard. > Richard Sandiford writes: > > This is a ping+rebase of the patch below. I've also optimised the > > handling of ignored attributes so that we don't register empty tables. > > There was also a typo in the

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Richard Biener
uite/gcc.target/i386/scev-5.c > similarity index 81% > rename from gcc/testsuite/gcc.dg/tree-ssa/scev-5.c > rename to gcc/testsuite/gcc.target/i386/scev-5.c > index 08f4260403c4..c911a9298866 100644 > --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c > +++ b/gcc/testsuite/gcc.target/i386/s

Re: [PATCH] i386: Mark Xeon Phi ISAs as deprecated

2023-11-30 Thread Richard Biener
On Fri, Dec 1, 2023 at 3:22 AM Haochen Jiang wrote: > > Since Knight Landing and Knight Mill microarchitectures are EOL, we > would like to remove its support in GCC 15. In GCC 14, we will first > emit a warning for the usage. I think it's better to keep supporting -mtune/arch=knl without

Re: [PATCH] gcov: Fix __LIBGCC_HAVE_LIBATOMIC definition

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 5:21 PM Sebastian Huber wrote: > > In libgcov we use defined (__LIBGCC_HAVE_LIBATOMIC), so we must define it only > if needed (vs. #if __LIBGCC_HAVE_LIBATOMIC). For consistency wouldn't it be better to change the user side in libgcc? > gcc/c-family/ChangeLog: > >

RE: [PATCH 8/21]middle-end: update vectorizable_live_reduction with support for multiple exits and different exits

2023-11-30 Thread Richard Biener
On Wed, 29 Nov 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Wednesday, November 29, 2023 2:29 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > > Subject

Re: [PATCH v2] A new copy propagation and PHI elimination pass

2023-11-30 Thread Richard Biener
dead (stmt)) > > > + gsi_remove (, true); > > > + else > > > + gsi_next (); > > > > this also fails to release the SSA def in the stmt. > > > > release_defs (stmt); > > > > would do that (or simple_dce_from_worklist). > > Interesting. Wouldn't expect that the order of removing statements would have > influence on debug information. > > Alright. Will rewrite this part of the pass to use simple_dce_from_worklist. > > > > + } > > > + > > > + gphi_iterator pi; > > > + for (pi = gsi_start_phis (bb); !gsi_end_p (pi);) > > > + { > > > + gphi *stmt = pi.phi (); > > > + > > > + if (is_stmt_dead (stmt)) > > > + remove_phi_node (, true); > > > + else > > > + gsi_next (); > > > + } > > > +} > > > + > > > + /* More cleanup. */ > > > + FOR_EACH_BB_FN (bb, cfun) > > > +gimple_purge_dead_eh_edges (bb); > > > > You only removed copies, I'm sure this should neve do anything? > > I think some testsuite testcases fail if I don't include this eh cleanup in my > pass. I don't understand eh edges very well but my explanation for this is > that > I may replace an SSA name with a constant and ensure that a statement won't > throw any exceptions anymore. For example in a x = 10 / y; statement I may > replace y by 5 which ensures that we won't have to handle zero division > exception for this statement. Yes, when you replace with constants that can happen. > > As a general comment I wonder if we can simplify most of the > > pass by starting SSA based SCC discovery from a copy stmt and > > whether we can reduce the number of vec<>s that are allocated > > and possibly re-allocated many times? > > I'm not sure what you mean by "starting SCC discovery from a copy stmt" here. When you currently collect copy stmts in the vec<> you could do SCC discovery with that as the starting stmt instead (if SCC discovery would handle identifying copy stmts itself). Thanks and sorry for the late reply. Richard. > Thanks for the review! > Filip > -- 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/112767 - spurious diagnostic after sccp/loop-split swap

2023-11-30 Thread Richard Biener
We are diagnosing an unreachable loop which we only manage to elide after the copyprop pass after sccp which leaves the code open for diagnosing by the intermittent ivcanon pass. The following makes sure to clean things up a bit earlier, propagating constant final values to uses immediately.

[PATCH] tree-optimization/112766 - improve pruning of uninit diagnostics

2023-11-30 Thread Richard Biener
Uninit diagnostics has code to prune based on incoming PHI args that prove the uninit code is never executed. But that only looks at the first found flag candidate while in the PRs case only the second candidate would be the one to prune on. The following patch makes us consider all of the flag

Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread Richard Biener
s. > > -- > juzhe.zh...@rivai.ai > > > *From:* Tamar Christina > *Date:* 2023-11-30 18:58 > *To:* juzhe.zh...@rivai.ai; gcc-patches > *CC:* Richard Biener > *Subject:* RE: RE: [PATCH 9/21]middle-end: implement > vectorizable_early_exit for

Re: [PATCH] doc: Update the status of build directory not fully separated

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 10:46 AM Xi Ruoyao wrote: > > Recently there are some people building GCC with srcdir == objdir and > the attempts just failed [1]. So stop to say "it should work". OTOH > objdir as a subdirectory of srcdir works (at least for LFS [2] and BLFS > [3]). > > [1]:

Re: [PATCH] hardcfr: libgcc sym versioning

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 8:55 AM Alexandre Oliva wrote: > > > The libgcc-exported runtime component of control flow redundancy > hardening was missing symbol versioning information. Add it. > > Regstrapped on x86_64-linux-gnu. Ok to install? OK. > > for libgcc/ChangeLog > > *

Re: [PATCH v4] Introduce strub: machine-independent stack scrubbing

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 5:13 AM Alexandre Oliva wrote: > > On Nov 29, 2023, Richard Biener wrote: > > >> Because _#(D)[n_#] is good gimple, but &(*byref_arg_#(D))[n_#] isn't. > > > 'arg_#(D)' looks like a SSA name, and no, taking the address doesn't work, >

Re: [PATCH v4] Introduce strub: machine-independent stack scrubbing

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 6:04 AM Alexandre Oliva wrote: > > On Nov 29, 2023, Richard Biener wrote: > > > On Wed, Nov 29, 2023 at 9:53 AM Alexandre Oliva wrote: > > >> Because _#(D)[n_#] is good gimple, but &(*byref_arg_#(D))[n_#] isn't. > > > 'arg_#(D

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Richard Biener
On Thu, 30 Nov 2023, Alexandre Oliva wrote: > On Nov 29, 2023, Hans-Peter Nilsson wrote: > > >> XPASS: gcc.dg/tree-ssa/scev-3.c scan-tree-dump-times ivopts "" 1 > >> XPASS: gcc.dg/tree-ssa/scev-4.c scan-tree-dump-times ivopts "" 1 > >> XPASS: gcc.dg/tree-ssa/scev-5.c scan-tree-dump-times ivopts

RE: [PATCH 10/21]middle-end: implement relevancy analysis support for control flow

2023-11-29 Thread Richard Biener
ar stmt.%G", stmt); > > +"not vectorized: irregular stmt: %G", > > stmt); > > } > > > >tree vectype; > > @@ -14490,6 +14528,14 @@ vect_get_vector_types_for_stmt (vec_info > > *vinfo, stmt_vec_info stmt_inf

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-29 Thread Richard Biener
rizable_lc_phi (as_a (vinfo), > > stmt_info, NULL, node) > > || vectorizable_recurr (as_a (vinfo), > > - stmt_info, NULL, node, cost_vec)); > > + stmt_info, NULL, node, cost_vec) > > + || vectorizable_early_exit (vinfo, stmt_info, NULL, NULL, node, > > + cost_vec)); > >else > > { > >if (bb_vinfo) > > @@ -12951,7 +13147,10 @@ vect_analyze_stmt (vec_info *vinfo, > > NULL, NULL, node, cost_vec) > > || vectorizable_comparison (vinfo, stmt_info, NULL, NULL, node, > > cost_vec) > > - || vectorizable_phi (vinfo, stmt_info, NULL, node, cost_vec)); > > + || vectorizable_phi (vinfo, stmt_info, NULL, node, cost_vec) > > + || vectorizable_early_exit (vinfo, stmt_info, NULL, NULL, node, > > + cost_vec)); > > + > > } > > > >if (node) > > @@ -13110,6 +13309,12 @@ vect_transform_stmt (vec_info *vinfo, > >gcc_assert (done); > >break; > > > > +case loop_exit_ctrl_vec_info_type: > > + done = vectorizable_early_exit (vinfo, stmt_info, gsi, _stmt, > > + slp_node, NULL); > > + gcc_assert (done); > > + break; > > + > > default: > >if (!STMT_VINFO_LIVE_P (stmt_info)) > > { > > @@ -13511,7 +13716,7 @@ vect_is_simple_use (tree operand, vec_info > > *vinfo, enum vect_def_type *dt, > > case vect_first_order_recurrence: > > dump_printf (MSG_NOTE, "first order recurrence\n"); > > break; > > - case vect_early_exit_def: > > + case vect_early_exit_def: > > dump_printf (MSG_NOTE, "early exit\n"); > > break; > > case vect_unknown_def_type: > > > > > > > > > > -- > -- 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 8/21]middle-end: update vectorizable_live_reduction with support for multiple exits and different exits

2023-11-29 Thread Richard Biener
{ > + if (dump_enabled_p ()) > + dump_printf_loc (MSG_NOTE, vect_location, > +"vec_stmt_relevant_p: induction forced for " > +"early break.\n"); > + *live_p = true; > + > +} > + >if (*live_p && *relevant == vect_unused_in_scope >&& !is_simple_and_all_uses_invariant (stmt_info, loop_vinfo)) > { > @@ -1774,7 +1788,7 @@ compare_step_with_zero (vec_info *vinfo, stmt_vec_info > stmt_info) > /* If the target supports a permute mask that reverses the elements in > a vector of type VECTYPE, return that mask, otherwise return null. */ > > -static tree > +tree > perm_mask_for_reverse (tree vectype) > { >poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype); > @@ -12720,20 +12734,27 @@ can_vectorize_live_stmts (vec_info *vinfo, > stmt_vec_info stmt_info, > bool vec_stmt_p, > stmt_vector_for_cost *cost_vec) > { > + loop_vec_info loop_vinfo = dyn_cast (vinfo); >if (slp_node) > { >stmt_vec_info slp_stmt_info; >unsigned int i; >FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (slp_node), i, slp_stmt_info) > { > - if (STMT_VINFO_LIVE_P (slp_stmt_info) > + if ((STMT_VINFO_LIVE_P (slp_stmt_info) > +|| (loop_vinfo > +&& LOOP_VINFO_EARLY_BREAKS (loop_vinfo) > +&& STMT_VINFO_DEF_TYPE (slp_stmt_info) > + == vect_induction_def)) > && !vectorizable_live_operation (vinfo, slp_stmt_info, slp_node, > slp_node_instance, i, > vec_stmt_p, cost_vec)) > return false; > } > } > - else if (STMT_VINFO_LIVE_P (stmt_info) > + else if ((STMT_VINFO_LIVE_P (stmt_info) > + || (LOOP_VINFO_EARLY_BREAKS (loop_vinfo) > + && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)) > && !vectorizable_live_operation (vinfo, stmt_info, > slp_node, slp_node_instance, -1, > vec_stmt_p, cost_vec)) > diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h > index > de60da31e2a3030a7fbc302d3f676af9683fd019..fd4b0a787e6128b43c5ca2b0612f55845e6b3cef > 100644 > --- a/gcc/tree-vectorizer.h > +++ b/gcc/tree-vectorizer.h > @@ -2248,6 +2248,7 @@ extern bool vect_is_simple_use (vec_info *, > stmt_vec_info, slp_tree, > enum vect_def_type *, > tree *, stmt_vec_info * = NULL); > extern bool vect_maybe_update_slp_op_vectype (slp_tree, tree); > +extern tree perm_mask_for_reverse (tree); > extern bool supportable_widening_operation (vec_info*, code_helper, > stmt_vec_info, tree, tree, > code_helper*, code_helper*, > -- 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 v4] Introduce strub: machine-independent stack scrubbing

2023-11-29 Thread Richard Biener
On Wed, Nov 29, 2023 at 9:53 AM Alexandre Oliva wrote: > > On Nov 23, 2023, Richard Biener wrote: > > > Conceptually it shouldn't be much different from what IPA-SRA does > > which is cloning a function but with different arguments, the function > > signature transfor

Re: [PATCH] [GCC] match.pd: Simplify rule for bitwise not with casts

2023-11-29 Thread Richard Biener
On Tue, Nov 28, 2023 at 7:56 PM Andrew Pinski wrote: > > On Tue, Nov 28, 2023 at 7:38 AM wrote: > > > > From: Ezra Sitorus > > > > Add the transform rule (T)(~A) -> ~(T)(A) for view_convert. The simplified > > result could be a single assembly instruction when chained with other > >

Re: Re: [PATCH v2] gimple-match.pd Add more optimization for gimple_cond

2023-11-29 Thread Richard Biener
On Tue, Nov 28, 2023 at 7:08 AM Andrew Pinski wrote: > > On Mon, Nov 27, 2023 at 10:04 PM Feng Wang > wrote: > > > > On 2023-11-28 11:06 Andrew Pinski wrote: > > >On Mon, Nov 27, 2023 at 6:56 PM Feng Wang > > >wrote: > > >> > > >> The link of PATCH v1: > > >>

Re: [PATCH] combine: Fix ICE in try_combine on pr112494.c [PR112560]

2023-11-29 Thread Richard Biener
On Wed, Nov 29, 2023 at 10:35 AM Uros Bizjak wrote: > > The compiler, configured with --enable-checking=yes,rtl,extra ICEs with: > > internal compiler error: RTL check: expected elt 0 type 'e' or 'u', > have 'E' (rtx unspec) in try_combine, at combine.cc:3237 > > This is > > 3236 /*

Re: [PATCH] wide-int: Fix wide_int division/remainder [PR112733]

2023-11-29 Thread Richard Biener
; } >wi_unpack (b_dividend, dividend.get_val (), dividend.get_len (), >dividend_blocks_needed, dividend_prec, UNSIGNED); > @@ -1969,7 +1975,7 @@ wi::divmod_internal (HOST_WIDE_INT *quot >if (b_quotient == b_quotient_buf) > memset (b_quotient_buf, 0, sizeof (

Re: [PATCH] fold-const: Fix up multiple_of_p [PR112733]

2023-11-29 Thread Richard Biener
> Am 29.11.2023 um 09:29 schrieb Jakub Jelinek : > > Hi! > > We ICE on the following testcase when wi::multiple_of_p is called on > widest_int 1 and -128 with UNSIGNED. I still need to work on the > actual wide-int.cc issue, the latest patch attached to the PR regressed > bitint-{38,39}.c,

Re: [PATCH] Take register pressure into account for vec_construct when the components are not loaded from memory.

2023-11-28 Thread Richard Biener
On Tue, Nov 28, 2023 at 8:54 AM liuhongt wrote: > > For vec_contruct, the components must be live at the same time if > they're not loaded from memory, when the number of those components > exceeds available registers, spill happens. Try to account that with a > rough estimation. > ??? Ideally,

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Jeff Law wrote: > > > On 11/28/23 00:50, Richard Biener wrote: > > > > > There's no way to distinguish a partial vs. non-partial MEM on RTL and > > while without the bogus MEM_ATTR the alias oracle pieces that > > miscompiled the origi

Re: [PATCH]middle-end: refactor vectorizable_live_operation into helper method for codegen

2023-11-28 Thread Richard Biener
gimple_stmt_iterator exit_gsi = gsi_after_labels (exit_bb); > - if (stmts) > - gsi_insert_seq_before (_gsi, stmts, GSI_SAME_STMT); > + gimple_stmt_iterator exit_gsi; > + tree new_tree > + = vectorizable_live_operation_1 (loop_vinfo, stmt_info, > + LOOP_VINFO_IV_EXIT (loop_vinfo), > + vectype, ncopies, slp_node, bitsize, > + bitstart, vec_lhs, lhs_type, > + _gsi); > >/* Remove existing phis that copy from lhs and create copies >from new_tree. */ > > > > > -- 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] tree-sra: Avoid returns of references to SRA candidates

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 18:38 schrieb Jan Hubicka : > >  >> >> >> >>>> Am 28.11.2023 um 17:59 schrieb Jan Hubicka : >>> >>>  >>>> >>>>> On Tue, 28 Nov 2023, Martin Jambor wrote: >>>>>

Re: [PATCH] tree-sra: Avoid returns of references to SRA candidates

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 17:59 schrieb Jan Hubicka : > >  >> >>> On Tue, 28 Nov 2023, Martin Jambor wrote: >>> >>> On Tue, Nov 28 2023, Richard Biener wrote: >>>> On Mon, 27 Nov 2023, Martin Jambor wrote: >>>> >>>>

Re: [PATCH] tree-sra: Avoid returns of references to SRA candidates

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Martin Jambor wrote: > On Tue, Nov 28 2023, Richard Biener wrote: > > On Mon, 27 Nov 2023, Martin Jambor wrote: > > > >> Hi, > >> > >> The enhancement to address PR 109849 contained an importsnt thinko, > >> and that

Re: [PATCH] MATCH: Fix invalid signed boolean type usage

2023-11-28 Thread Richard Biener
On Tue, Nov 28, 2023 at 5:44 AM Andrew Pinski wrote: > > This fixes the incorrect assumption that was done in r14-3721-ge6bcf839894783, > that being able to doing the negative after the conversion would be a valid > thing > but really it is not valid for boolean types. > > OK? Bootstrapped and

Re: [PATCH] testsuite: Handle double-quoted LTO section names [PR112728]

2023-11-28 Thread Richard Biener
On Tue, Nov 28, 2023 at 2:24 PM Rainer Orth wrote: > > The gcc.dg/scantest-lto.c test FAILs on Solaris/SPARC with the native as: > > FAIL: gcc.dg/scantest-lto.c scan-assembler-not ascii > FAIL: gcc.dg/scantest-lto.c scan-assembler-times ascii 0 > > It requires double-quoting the section name

[PATCH] middle-end/112741 - ICE with gimple FE and later regimplification

2023-11-28 Thread Richard Biener
The GIMPLE frontend, when bypassing gimplification, doesn't set DECL_SEEN_IN_BIND_EXPR_P given there are no such things in GIMPLE. But it probably should set the flag anyway to avoid later ICEs when regimplifying. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR

[PATCH] middle-end/112732 - stray TYPE_ALIAS_SET in type variant

2023-11-28 Thread Richard Biener
The following fixes a stray TYPE_ALIAS_SET in a type variant built by build_opaque_vector_type which is diagnosed by type checking enabled with -flto. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/112732 * tree.cc (build_opaque_vector_type): Reset

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Tue, 28 Nov 2023, Richard Sandiford wrote: > > > >> Richard Biener writes: > >> > On Mon, 27 Nov 2023, Jeff Law wrote: > >> > > >> >> > >> >

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Mon, 27 Nov 2023, Jeff Law wrote: > > > >> > >> > >> On 11/27/23 05:39, Robin Dapp wrote: > >> >> The easiest way to avoid running into the alias analysi

Re: [PATCH V2] introduce light expander sra

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Jiufu Guo wrote: > > Hi, > > Thanks so much for your helpful review! > > Richard Biener writes: > > > On Fri, Oct 27, 2023 at 3:51?AM Jiufu Guo wrote: > >> > >> Hi, > >> > >> Compare with previous versi

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Joseph Myers wrote: > On Sun, 26 Nov 2023, Martin Uecker wrote: > > > My understand is that it is used for aliasing analysis and also > > checking of conversions. TYPE_CANONICAL must be consistent with > > the idea the middle-end has about type conversions. But as long > >

Re: [PATCH]middle-end: prevent LIM from hoising vector compares from gconds if target does not support it.

2023-11-28 Thread Richard Biener
et_supports_op_p (type, code, optab_vector)) > + return false; > + } > + > /* Fold in dependencies and cost of the condition. */ > FOR_EACH_SSA_TREE_OPERAND (val, cond, iter, SSA_OP_USE) > { > > > > > -- 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] testsuite: Fix up pr111754.c test

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 09:58 schrieb Jakub Jelinek : > > On Tue, Nov 28, 2023 at 09:43:52AM +0100, Jakub Jelinek wrote: >>> On Tue, Nov 28, 2023 at 03:56:47PM +0800, juzhe.zh...@rivai.ai wrote: >>> Hi, there is a regression in RISC-V caused by this patch: >>> >>> FAIL: gcc.dg/vect/pr111754.c

Re: [PATCH] match.pd: Fix parity (X) ^ parity (Y) simplification [PR112719]

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 09:36 schrieb Jakub Jelinek : > > Hi! > > When looking around, I've noticed we have a similar simplification > for parity (with ^ rather than +). Note, unlike the popcount one, > this one doesn't check for INTEGRAL_TYPE_P (type) (which rules out > vector simplification),

Re: [PATCH] match.pd: Fix popcount (X) + popcount (Y) simplification [PR112719]

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 09:30 schrieb Jakub Jelinek : > > Hi! > > Since my PR112566 r14-5557 changes the following testcase ICEs, because > .POPCOUNT (x) + .POPCOUNT (y) has a simplification attempted even when > x and y have incompatible types (different precisions). > Note, with _BitInt it can

Re: [PATCH v6 0/21]middle-end: Support early break/return auto-vectorization

2023-11-28 Thread Richard Biener
On Mon, 27 Nov 2023, Richard Sandiford wrote: > Catching up on backlog, so this might already be resolved, but: > > Richard Biener writes: > > On Tue, 7 Nov 2023, Tamar Christina wrote: > > > >> > -Original Message- > >> > From: Richard Bie

Re: [PATCH] tree-sra: Avoid returns of references to SRA candidates

2023-11-28 Thread Richard Biener
DIRECTLY); > + } > + else > + can_be_returned = false; > + ret |= build_access_from_call_arg (gimple_call_arg (call, > + i), > +

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-27 Thread Richard Biener
On Mon, 27 Nov 2023, Jeff Law wrote: > > > On 11/27/23 05:39, Robin Dapp wrote: > >> The easiest way to avoid running into the alias analysis problem is > >> to scrap the MEM_EXPR when we expand the internal functions for > >> partial loads/stores. That avoids the disambiguation we run into >

[PATCH] tree-optimization/112653 - PTA and return

2023-11-27 Thread Richard Biener
The following separates the escape solution for return stmts not only during points-to solving but also for later querying. This requires adjusting the points-to-global tests to include escapes through returns. Technically the patch replaces the existing post-processing which computes the

Re: [PATCH] vect: Avoid duplicate_and_interleave for uniform vectors [PR112661]

2023-11-27 Thread Richard Biener
ld_vector_from_val > for all eligible vectors. > > Tested on aarch64-linux-gnu (with and without SVE) and x86_64-linux-gnu. > OK to install? OK. Thanks for picking up. Richard. > Richard > > > 2023-11-27 Richard Biener > Richard Sandiford

Re: [PATCH] PR tree-optimization/111922 - Ensure wi_fold arguments match precisions.

2023-11-27 Thread Richard Biener
On Fri, Nov 24, 2023 at 5:53 PM Andrew MacLeod wrote: > > This problem here is that IPA is calling something like operator_minus > with 2 operands, one with precision 32 (int) and one with precision 64 > (pointer). There are various ways this can happen as mentioned in the PR. > > Regardless of

[PATCH] tree-optimization/112706 - missed simplification of condition

2023-11-27 Thread Richard Biener
We lack a match.pd pattern recognizing ptr + o ==/!= ptr + o'. The following extends handling we have for integral types to pointers. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112706 * match.pd (ptr + o ==/!=/- ptr + o'): New patterns.

Re: [PATCH] testsuite, x86: Handle a broken assembler.

2023-11-27 Thread Richard Biener
On Mon, Nov 27, 2023 at 9:11 AM FX Coudert wrote: > > Hi, > > I’d like to ping that patch from Iain Sandoe. It would clear up a number of > failures in the darwin testsuite. OK. > Thanks, > FX > > > > > --- 8< --- > > > > Earlier assembler support for complex fp16 on x86_64 Darin is broken.

<    4   5   6   7   8   9   10   11   12   13   >