RE: [PATCH]AArch64 xorsign: Fix scalar xorsign lowering

2023-09-01 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, September 1, 2023 2:36 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH]AArch64 xorsign: Fix scalar xorsign lowering > > Tamar

[PATCH]AArch64 xorsign: Fix scalar xorsign lowering

2023-09-01 Thread Tamar Christina via Gcc-patches
Hi All, In GCC-9 our scalar xorsign pattern broke and we didn't notice it because the testcase was not strong enough. With this commit 8d2d39587d941a40f25ea0144cceb677df115040 is the first bad commit commit 8d2d39587d941a40f25ea0144cceb677df115040 Author: Segher Boessenkool Date: Mon Oct 22

RE: [PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-08-18 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Friday, August 18, 2023 2:53 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: RE: [PATCH 12/19]middle-end: implement loop peeling and IV > updates for early break. > > On Fri, 18 Aug 2023,

RE: [PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-08-18 Thread Tamar Christina via Gcc-patches
> > Yeah if you comment it out one of the testcases should fail. > > using new_preheader instead of e->dest would make things clearer. > > You are now adding the same arg to every exit (you've just queried the > main exit redirect_edge_var_map_vector). > > OK, so I think I understand what

RE: [PATCH]AArch64 update costing for MLA by invariant

2023-08-03 Thread Tamar Christina via Gcc-patches
> >> Do you see vect_constant_defs in practice, or is this just for > >> completeness? > >> I would expect any constants to appear as direct operands. I don't > >> mind keeping it if it's just a belt-and-braces thing though. > > > > In the latency case where I had allow_constants the early

RE: [PATCH]AArch64 Undo vec_widen_shiftl optabs [PR106346]

2023-08-03 Thread Tamar Christina via Gcc-patches
> > + > > +(define_constraint "D3" > > + "@internal > > + A constraint that matches vector of immediates that is with 0 to > > +(bits(mode)/2)-1." > > + (and (match_code "const,const_vector") > > + (match_test "aarch64_const_vec_all_same_in_range_p (op, 0, > > +

RE: [PATCH]AArch64 update costing for MLA by invariant

2023-08-02 Thread Tamar Christina via Gcc-patches
> Tamar Christina writes: > > Hi All, > > > > When determining issue rates we currently discount non-constant MLA > > accumulators for Advanced SIMD but don't do it for the latency. > > > > This means the costs for Advanced SIMD with a constant accumulator are > > wrong and results in us costing

[PATCH][gensupport]: Don't segfault on empty attrs list

2023-08-02 Thread Tamar Christina via Gcc-patches
Hi All, Currently we segfault when len == 0 for an attribute list. essentially [cons: =0, 1, 2, 3; attrs: ] segfaults but should be equivalent to [cons: =0, 1, 2, 3] and [cons: =0, 1, 2, 3; attrs:]. This fixes it by just returning early and leaving it to the validators whether this should error

[PATCH]AArch64 Undo vec_widen_shiftl optabs [PR106346]

2023-08-02 Thread Tamar Christina via Gcc-patches
Hi All, In GCC 11 we implemented the vectorizer optab for widening left shifts, however this optab is only supported for uniform shift constants. At the moment GCC still has two loop vectorization strategy (classical loop and SLP based loop vec) and the optab is implemented as a scalar pattern.

[PATCH]AArch64 update costing for combining vector conditionals

2023-08-02 Thread Tamar Christina via Gcc-patches
Hi All, boolean comparisons have different cost depending on the mode. e.g. a && b when predicated doesn't require an addition instruction, the AND is free by combining the predicate of the one operation into the second one. At the moment though we only fuse compares so this update requires one

[PATCH]AArch64 update costing for MLA by invariant

2023-08-02 Thread Tamar Christina via Gcc-patches
Hi All, When determining issue rates we currently discount non-constant MLA accumulators for Advanced SIMD but don't do it for the latency. This means the costs for Advanced SIMD with a constant accumulator are wrong and results in us costing SVE and Advanced SIMD the same. This can cauze us to

RE: [PATCH 2/2][frontend]: Add novector C pragma

2023-08-02 Thread Tamar Christina via Gcc-patches
Ping. > -Original Message- > From: Tamar Christina > Sent: Wednesday, July 26, 2023 8:35 PM > To: Tamar Christina ; gcc-patches@gcc.gnu.org > Cc: nd ; jos...@codesourcery.com > Subject: RE: [PATCH 2/2][frontend]: Add novector C pragma > > Hi, This is a respin of the patch taking in the

RE: [PATCH 2/2][frontend]: Add novector C pragma

2023-07-26 Thread Tamar Christina via Gcc-patches
Hi, This is a respin of the patch taking in the feedback received from the C++ part. Simultaneously it's also a ping  Hi All, FORTRAN currently has a pragma NOVECTOR for indicating that vectorization should not be applied to a particular loop. ICC/ICX also has such a pragma for C and

RE: [PATCH 1/2][frontend] Add novector C++ pragma

2023-07-26 Thread Tamar Christina via Gcc-patches
> > + > > + cp_token *tok = pragma_tok; > > + > > + do > > { > > - tok = cp_lexer_consume_token (parser->lexer); > > - ivdep = cp_parser_pragma_ivdep (parser, tok); > > - tok = cp_lexer_peek_token (the_parser->lexer); > > + switch (cp_parser_pragma_kind (tok)) > >

[PATCH 2/2][frontend]: Add novector C pragma

2023-07-19 Thread Tamar Christina via Gcc-patches
Hi All, FORTRAN currently has a pragma NOVECTOR for indicating that vectorization should not be applied to a particular loop. ICC/ICX also has such a pragma for C and C++ called #pragma novector. As part of this patch series I need a way to easily turn off vectorization of particular loops,

[PATCH 1/2][frontend] Add novector C++ pragma

2023-07-19 Thread Tamar Christina via Gcc-patches
Hi All, FORTRAN currently has a pragma NOVECTOR for indicating that vectorization should not be applied to a particular loop. ICC/ICX also has such a pragma for C and C++ called #pragma novector. As part of this patch series I need a way to easily turn off vectorization of particular loops,

[PATCH]AArch64 fix regexp for live_1.c sve test

2023-07-18 Thread Tamar Christina via Gcc-patches
Hi All, The resulting predicate register of a whilelo is not restricted to the lower half of the predicate register file. As such these tests started failing after recent changes because the whilelo outside the loop is getting assigned p15. This widens the regexp. Tested on

RE: [PATCH v2] tree-optimization/110279- Check for nested FMA chains in reassoc

2023-07-17 Thread Tamar Christina via Gcc-patches
I think Andrew is listed as maintainer for tree-ssa, or maybe it's on one of the Richard's lists? > -Original Message- > From: Gcc-patches bounces+tamar.christina=arm@gcc.gnu.org> On Behalf Of Philipp > Tomsich > Sent: Tuesday, July 11, 2023 7:51 AM > To: Jakub Jelinek > Cc:

RE: [PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-07-17 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Friday, July 14, 2023 2:35 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: RE: [PATCH 12/19]middle-end: implement loop peeling and IV > updates for early break. > > On Thu, 13 Jul 2023,

RE: [PATCH] Fix bootstrap failure (with g++ 4.8.5) in tree-if-conv.cc.

2023-07-17 Thread Tamar Christina via Gcc-patches
> On Mon, Jul 17, 2023 at 12:21 AM Tamar Christina via Gcc-patches patc...@gcc.gnu.org> wrote: > > > > > -Original Message- > > > From: Richard Biener > > > Sent: Monday, July 17, 2023 7:19 AM > > > To: Roger Sayle > > > Cc: gcc-

RE: [PATCH] Fix bootstrap failure (with g++ 4.8.5) in tree-if-conv.cc.

2023-07-17 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, July 17, 2023 7:19 AM > To: Roger Sayle > Cc: gcc-patches@gcc.gnu.org; Tamar Christina > Subject: Re: [PATCH] Fix bootstrap failure (with g++ 4.8.5) in > tree-if-conv.cc. > > On Fri, Jul 14, 2023 at 8:56 PM Roger Sayle >

RE: [PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-07-13 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Thursday, July 13, 2023 6:31 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: Re: [PATCH 12/19]middle-end: implement loop peeling and IV > updates for early break. > > On Wed, 28 Jun 2023,

RE: [PATCH 8/19]middle-end: updated niters analysis to handle multiple exits.

2023-07-13 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Thursday, July 13, 2023 12:49 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: Re: [PATCH 8/19]middle-end: updated niters analysis to handle > multiple exits. > > On Wed, 28 Jun 2023, Tamar

RE: [PATCH 7/19]middle-end: Refactor vectorizer loop conditionals and separate out IV to new variables

2023-07-13 Thread Tamar Christina via Gcc-patches
> e7ac2b5f3db55de3dbbab7bd2bfe08388f4ec533..cab82d7960e5be517bba2 > 621f7f4 > > 888e7bf3c295 100644 > > --- a/gcc/cfgloop.h > > +++ b/gcc/cfgloop.h > > @@ -272,6 +272,14 @@ public: > > the basic-block from being collected but its index can still be > > reused. */ > >basic_block

RE: [PATCH 5/19]middle-end: Enable bit-field vectorization to work correctly when we're vectoring inside conds

2023-07-10 Thread Tamar Christina via Gcc-patches
> > - *type_out = STMT_VINFO_VECTYPE (stmt_info); > > + if (cond_cst) > > +{ > > + append_pattern_def_seq (vinfo, stmt_info, pattern_stmt, vectype); > > + pattern_stmt > > + = gimple_build_cond (gimple_cond_code (cond_stmt), > > +gimple_get_lhs

RE: [PATCH 4/19]middle-end: Fix scale_loop_frequencies segfault on multiple-exits

2023-07-07 Thread Tamar Christina via Gcc-patches
Hi Both, Thanks for all the reviews/patches so far  > > > > Looks good, but I wonder what we can do to at least make the multiple > > exit case behave reasonably? The vectorizer keeps track > > > of a "canonical" exit, would it be possible to pass in the main exit > > edge and use that

[PATCH 2/2]middle-end ifcvt: Sort PHI arguments not only occurrences but also complexity [PR109154]

2023-07-07 Thread Tamar Christina via Gcc-patches
Hi All, This patch builds on the previous patch by fixing another issue with the way ifcvt currently picks which branches to test. The issue with the current implementation is while it sorts for occurrences of the argument, it doesn't check for complexity of the arguments. As an example:

[PATCH 1/2]middle-end ifcvt: Reduce comparisons on conditionals by tracking truths [PR109154]

2023-07-07 Thread Tamar Christina via Gcc-patches
Hi All, Following on from Jakub's patch in g:de0ee9d14165eebb3d31c84e98260c05c3b33acb these two patches finishes the work fixing the regression and improves codegen. As explained in that commit, ifconvert sorts PHI args in increasing number of occurrences in order to reduce the number of

RE: [PATCH 6/19]middle-end: Don't enter piecewise expansion if VF is not constant.

2023-07-06 Thread Tamar Christina via Gcc-patches
> On Wed, 28 Jun 2023, Tamar Christina wrote: > > > Hi All, > > > > expand_vector_piecewise does not support VLA expansion as it has a > > hard assert on the type not being VLA. > > > > Instead of just failing to expand and so the call marked unsupported we ICE. > > This adjust it so we don't and

RE: [PATCH 2/19][front-end] C/C++ front-end: add pragma GCC novector

2023-06-30 Thread Tamar Christina via Gcc-patches
Hi Jason, Thanks for the review. I only now realized I should have split them between C and C++. Will do so on the respins. > > On 6/28/23 09:41, Tamar Christina wrote: > > Hi All, > > > > FORTRAN currently has a pragma NOVECTOR for indicating that > > vectorization should not be applied to a

RE: FW: [PATCH v5 0/19] Support early break/return auto-vectorization

2023-06-28 Thread Tamar Christina via Gcc-patches
s. > > > juzhe.zh...@rivai.ai > > From: Li, Pan2 > Date: 2023-06-28 22:21 > To: juzhe.zh...@rivai.ai > Subject: FW: [PATCH v5 0/19] Support early break/return auto-vectorization > FYI. > > -Original Message- > From: Gcc-patches > On Behalf

RE: [PATCH 9/19] middle-end: refactor vectorizable_comparison to make the main body re-usable.

2023-06-28 Thread Tamar Christina via Gcc-patches
Adding proper maintainers. > -Original Message- > From: Tamar Christina > Sent: Wednesday, June 28, 2023 2:46 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Marcus Shawcroft ; Kyrylo Tkachov > ; Richard Sandiford > > Subject: [PATCH 9/19]AArch64 middle-end: refactor

RE: [PATCH 3/19]middle-end clean up vect testsuite using pragma novector

2023-06-28 Thread Tamar Christina via Gcc-patches
Resending attached only due to size limit > -Original Message- > From: Tamar Christina > Sent: Wednesday, June 28, 2023 2:42 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; rguent...@suse.de; j...@ventanamicro.com > Subject: [PATCH 3/19]middle-end clean up vect testsuite using pragma >

[PATCH 16/19]AArch64 Add optimization for vector != cbranch fed into compare with 0 for Advanced SIMD

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, Advanced SIMD lacks a cmpeq for vectors, and unlike compare to 0 we can't rewrite to a cmtst. This operation is however fairly common, especially now that we support early break vectorization. As such this adds a pattern to recognize the negated any comparison and transform it to an

[PATCH 15/19]AArch64: Add implementation for vector cbranch for Advanced SIMD

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, This adds an implementation for conditional branch optab for AArch64. For e.g. void f1 () { for (int i = 0; i < N; i++) { b[i] += a[i]; if (a[i] > 0) break; } } For 128-bit vectors we generate: cmgtv1.4s, v1.4s, #0 umaxp v1.4s,

[PATCH 18/19]Arm: Add Advanced SIMD cbranch implementation

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, This adds an implementation for conditional branch optab for AArch32. For e.g. void f1 () { for (int i = 0; i < N; i++) { b[i] += a[i]; if (a[i] > 0) break; } } For 128-bit vectors we generate: vcgt.s32q8, q9, #0 vpmax.u32

[PATCH 19/19]Arm: Add MVE cbranch implementation

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, This adds an implementation for conditional branch optab for MVE. Unfortunately MVE has rather limited operations on VPT.P0, we are missing the ability to do P0 comparisons and logical OR on P0. For that reason we can only support cbranch with 0, as for comparing to a 0 predicate we

[PATCH 17/19]AArch64 Add optimization for vector cbranch combining SVE and Advanced SIMD

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, Advanced SIMD lacks flag setting vector comparisons which SVE adds. Since machines with SVE also support Advanced SIMD we can use the SVE comparisons to perform the operation in cases where SVE codegen is allowed, but the vectorizer has decided to generate Advanced SIMD because of loop

[PATCH 13/19]middle-end testsuite: un-xfail TSVC loops that check for exit control flow vectorization

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, I didn't want these to get lost in the noise of updates. The following three tests now correctly work for targets that have an implementation of cbranch for vectors so XFAILs are conditionally removed gated on vect_early_break support. Bootstrapped Regtested on aarch64-none-linux-gnu

[PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, This patch updates the peeling code to maintain LCSSA during peeling. The rewrite also naturally takes into account multiple exits and so it didn't make sense to split them off. For the purposes of peeling the only change for multiple exits is that the secondary exits are all wired to

[PATCH 10/19]middle-end: implement vectorizable_early_break.

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, This implements vectorable_early_exit which is used as the codegen part of vectorizing a gcond. For the most part it shares the majority of the code with vectorizable_comparison with addition that it needs to be able to reduce multiple resulting statements into a single one for use in

[PATCH 11/19]middle-end: implement code motion for early break.

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, When performing early break vectorization we need to be sure that the vector operations are safe to perform. A simple example is e.g. for (int i = 0; i < N; i++) { vect_b[i] = x + i; if (vect_a[i]*2 != x) break; vect_a[i] = x; } where the store to vect_b is not allowed

[PATCH 9/19]AArch64 middle-end: refactor vectorizable_comparison to make the main body re-usable.

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, Vectorization of a gcond starts off essentially the same as vectorizing a comparison witht he only difference being how the operands are extracted. This refactors vectorable_comparison such that we now have a generic function that can be used from vectorizable_early_break. The

[PATCH 8/19]middle-end: updated niters analysis to handle multiple exits.

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, For early break vectorization we have to update niters analysis to record and analyze all exits of the loop, and so all conds. The niters of the loop is still determined by the main/natural exit of the loop as this is the O(n) bounds. For now we don't do much with the secondary conds,

[PATCH 7/19]middle-end: Refactor vectorizer loop conditionals and separate out IV to new variables

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, This patch splits off the vectorizer's understanding of the main loop exit off from the normal loop infrastructure. Essentially we're relaxing the use of single_exit() in the vectorizer as we will no longer have a single single and need a well defined split between the main and secondary

[PATCH 6/19]middle-end: Don't enter piecewise expansion if VF is not constant.

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, expand_vector_piecewise does not support VLA expansion as it has a hard assert on the type not being VLA. Instead of just failing to expand and so the call marked unsupported we ICE. This adjust it so we don't and can gracefully handle the expansion in support checks. Bootstrapped

[PATCH 5/19]middle-end: Enable bit-field vectorization to work correctly when we're vectoring inside conds

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, The bitfield vectorization support does not currently recognize bitfields inside gconds. This means they can't be used as conditions for early break vectorization which is a functionality we require. This adds support for them by explicitly matching and handling gcond as a source.

[PATCH 4/19]middle-end: Fix scale_loop_frequencies segfault on multiple-exits

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, There's an existing bug in loop frequency scaling where the if statement checks to see if there's a single exit, and records an dump file note but then continues. It then tries to access the null pointer, which of course fails. For multiple loop exists it's not really clear how to scale

[PATCH 2/19][front-end] C/C++ front-end: add pragma GCC novector

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, FORTRAN currently has a pragma NOVECTOR for indicating that vectorization should not be applied to a particular loop. ICC/ICX also has such a pragma for C and C++ called #pragma novector. As part of this patch series I need a way to easily turn off vectorization of particular loops,

[PATCH 1/19]middle-end ifcvt: Support bitfield lowering of multiple-exit loops

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi, With the patch enabling the vectorization of early-breaks, we'd like to allow bitfield lowering in such loops, which requires the relaxation of allowing multiple exits when doing so. In order to avoid a similar issue to PR107275, the code that rejects loops with certain types of gimple_stmts

[PATCH v5 0/19] Support early break/return auto-vectorization

2023-06-28 Thread Tamar Christina via Gcc-patches
Hi All, This patch adds initial support for early break vectorization in GCC. The support is added for any target that implements a vector cbranch optab, this includes both fully masked and non-masked targets. Depending on the operation, the vectorizer may also require support for boolean mask

[PATCH][committed][docs]: replace backslashchar [PR 110329].

2023-06-21 Thread Tamar Christina via Gcc-patches
Hi All, It seems like @blackslashchar{} is a relatively new addition to texinfo. Other parts of the docs use @samp{\} so use it here too so older distros work. Bootstrapped on aarch64-none-linux-gnu and no issues. committed under obvious rule. Thanks, Tamar gcc/ChangeLog: PR

[PATCH][gensupport] drop suppport for define_cond_exec from compact syntac

2023-06-20 Thread Tamar Christina via Gcc-patches
Hi All, define_cond_exec does not support the special @@ syntax and so can't support {@. As such just remove support for it. Bootstrapped and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR bootstrap/110324 * gensupport.cc (convert_syntax): Explicitly check for RTX

[PATCH][committed]AArch64 remove test comment from *mov_aarch64

2023-06-20 Thread Tamar Christina via Gcc-patches
Hi All, I accidentally left a test comment in the final version of the patch. This removes the comment. Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64.md (*mov_aarch64): Drop test comment.

RE: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jeff Law > Sent: Tuesday, June 20, 2023 3:17 AM > To: Andrew Pinski ; Thiago Jung Bauermann > > Cc: Manolis Tsamis ; Philipp Tomsich > ; Richard Biener ; > Palmer Dabbelt ; Kito Cheng ; > gcc-patches@gcc.gnu.org; Tamar Christina > Subject: Re: [PATCH 2/2]

RE: [PATCH] Remove -save-temps from tests using -flto

2023-06-19 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, June 19, 2023 11:19 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] Remove -save-temps from tests using -flto > > On Mon, 19 Jun 2023, Tamar Christina wrote: > > > > -Original Message- > >

RE: [PATCH] Remove -save-temps from tests using -flto

2023-06-19 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, June 19, 2023 7:28 AM > To: gcc-patches@gcc.gnu.org > Cc: Tamar Christina > Subject: [PATCH] Remove -save-temps from tests using -flto > > The following removes -save-temps that doesn't seem to have any good > reason from tests

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-13 Thread Tamar Christina via Gcc-patches
Hi All, Updated patch with feedback addressed. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Any feedback? Thanks, Tamar gcc/ChangeLog: * gensupport.cc (class conlist, add_constraints, add_attributes, skip_spaces, expect_char, preprocess_compact_syntax,

[PATCH] Remove DEFAULT_MATCHPD_PARTITIONS macro

2023-06-12 Thread Tamar Christina via Gcc-patches
Hi All, As Jakub pointed out, DEFAULT_MATCHPD_PARTITIONS is now unused and can be removed. Bootstrapped aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config.in: Regenerate. * configure: Regenerate. * configure.ac: Remove

RE: [PATCH][committed] Regenerate config.in

2023-06-12 Thread Tamar Christina via Gcc-patches
> > Do you use the DEFAULT_MATCHPD_PARTITIONS macro anywhere? > If not, why the AC_DEFINE_UNQUOTED at all and not just the AC_SUBST? > It used to be used to change the default of genmatch.cc, but the default is now not to split anymore. So guess I can remove it. Will follow up...

[PATCH][committed] Regenerate config.in

2023-06-12 Thread Tamar Christina via Gcc-patches
Hi All, Looks like I forgot to regenerate config.in which causes updates when you enable maintainer mode. Bootstrapped aarch64-none-linux-gnu. Committed under obvious rule. Thanks, Tamar gcc/ChangeLog: * config.in: Regenerate. --- inline copy of patch -- diff --git a/gcc/config.in

RE: gcc/config.in was not regenerated

2023-06-12 Thread Tamar Christina via Gcc-patches
Hi Coudert, Sorry, missed that one. I'll fix that. Tamar. > -Original Message- > From: FX Coudert > Sent: Saturday, June 10, 2023 9:21 PM > To: Tamar Christina > Cc: g...@gcc.gnu.org; Jeff Law ; gcc- > patc...@gcc.gnu.org > Subject: gcc/config.in was not regenerated > > Hi, > >

[PATCH][GCC][AArch64] convert some patterns to new MD syntax

2023-06-08 Thread Tamar Christina via Gcc-patches
Hi All, This converts some patterns in the AArch64 backend to use the new compact syntax. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? gcc/ChangeLog: * config/aarch64/aarch64.md (arches): Add nosimd. (*mov_aarch64, *movsi_aarch64,

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-08 Thread Tamar Christina via Gcc-patches
Hi, New version of the patch, I've omitted the explanation again  Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Any feedback? Thanks, Tamar gcc/ChangeLog: * gensupport.cc (class conlist, add_constraints, add_attributes, create_missing_attributes,

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-06 Thread Tamar Christina via Gcc-patches
Hi, Thanks for the review, just some quick responses before I make the changes: > >int operand_number; /* Operand index in the big array. */ > >int output_format; /* INSN_OUTPUT_FORMAT_*. */ > > + bool compact_syntax_p; > >struct operand_data

[PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-05 Thread Tamar Christina via Gcc-patches
Hi All, This patch adds support for a compact syntax for specifying constraints in instruction patterns. Credit for the idea goes to Richard Earnshaw. With this new syntax we want a clean break from the current limitations to make something that is hopefully easier to use and maintain. The idea

RE: middle-end: Support early break/return auto-vectorization.

2023-05-15 Thread Tamar Christina via Gcc-patches
Hi, Yes I hope to upstream it this year. I'm busy cleaning up a new version of the patch which and hope to send it up for review again next week if all tests pass. Cheers, Tamar From: juzhe.zh...@rivai.ai Sent: Monday, May 15, 2023 6:20 AM To: gcc-patches Cc: rguenther ; Tamar Christina ;

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Alexander Monakov > Sent: Friday, May 5, 2023 7:22 PM > To: Tamar Christina > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] Makefile.in: clean up match.pd-related dependencies > > > On Fri, 5 May 2023, Tamar Christina wrote: > > > >

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Alexander Monakov > Sent: Friday, May 5, 2023 6:59 PM > To: Tamar Christina > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] Makefile.in: clean up match.pd-related dependencies > > > On Fri, 5 May 2023, Tamar Christina wrote: > > > > >

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Tamar Christina via Gcc-patches
> > Am 05.05.2023 um 19:03 schrieb Alexander Monakov via Gcc-patches patc...@gcc.gnu.org>: > > > > Clean up confusing changes from the recent refactoring for parallel > > match.pd build. > > > > gimple-match-head.o is not built. Remove related flags adjustment. > > > > Autogenerated

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jakub Jelinek > Sent: Friday, May 5, 2023 4:33 PM > To: Tamar Christina > Cc: Jeff Law ; David Edelsohn ; > GCC Patches > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make > configurable. > > On Fri, May 05, 2023 at 03:22:11PM +, Tamar

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jakub Jelinek > Sent: Friday, May 5, 2023 4:18 PM > To: Jeff Law > Cc: David Edelsohn ; Tamar Christina > ; GCC Patches > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make > configurable. > > On Fri, May 05, 2023 at 09:04:16AM -0600, Jeff

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jeff Law > Sent: Friday, May 5, 2023 4:04 PM > To: David Edelsohn ; Tamar Christina > > Cc: GCC Patches > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make > configurable. > > > > On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote: > >

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> This looks pretty reasonable to me. Are there any patches left in > this series that need review? I'm very much looking forward to > build time provements related to this patch, particularly for > targets that I bootstrap with qemu emulation -- we take multiple > hours

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-04 Thread Tamar Christina via Gcc-patches
/5] match.pd: Use splits in makefile and make > configurable. > > > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm....@gcc.gnu.org> On Behalf Of Tamar > > Christina via Gcc-patches > > Sent: Tuesday, May 2, 2023 8:

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-02 Thread Tamar Christina via Gcc-patches
in makefile and make > configurable. > > > > On 4/28/23 04:44, Tamar Christina via Gcc-patches wrote: > > Hi All, > > > > This updates the build system to split up match.pd files into chunks of 10. > > This also introduces a new flag --with-matchpd-partiti

RE: [PATCH 2/5] match.pd: Remove commented out line pragmas unless -vv is used.

2023-04-28 Thread Tamar Christina via Gcc-patches
> On the check for verbose==2, should that be verbose >= 2 ? > That's fair enough. Made the change. Thanks, Tamar. > paul > > > On Apr 28, 2023, at 6:38 AM, Tamar Christina via Gcc-patches patc...@gcc.gnu.org> wrote: > > > > Hi All, > > > &g

[PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-04-28 Thread Tamar Christina via Gcc-patches
Hi All, This updates the build system to split up match.pd files into chunks of 10. This also introduces a new flag --with-matchpd-partitions which can be used to change the number of partitions. For the analysis of why 10 please look at the previous patch in the series. Bootstrapped Regtested

RE: [PATCH 3/3]middle-end RFC - match.pd: automatically partition *-match.cc files.

2023-04-28 Thread Tamar Christina via Gcc-patches
> > [1] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-04/msg01125.html > > > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > > > Ok for master? > > Some comments - I have to leave the Makefile bits to somebody else to see > whether they are portable as-is. > > The private

[PATCH 3/5] match.pd: CSE the dump output check.

2023-04-28 Thread Tamar Christina via Gcc-patches
Hi All, This is a small improvement in QoL codegen for match.pd to save time not re-evaluating the condition for printing debug information in every function. There is a small but consistent runtime and compile time win here. The runtime win comes from not having to do the condition over again,

[PATCH 2/5] match.pd: Remove commented out line pragmas unless -vv is used.

2023-04-28 Thread Tamar Christina via Gcc-patches
Hi All, genmatch currently outputs commented out line directives that have no effect but the compiler still has to parse only to discard. They are however handy when debugging genmatch output. As such this moves them behind the -vv flag. Bootstrapped Regtested on aarch64-none-linux-gnu and no

RE: [PATCH 2/3]middle-end match.pd: simplify debug dump checks

2023-04-25 Thread Tamar Christina via Gcc-patches
t; j...@ventanamicro.com > > > Subject: Re: [PATCH 2/3]middle-end match.pd: simplify debug dump > > > checks > > > > > > On Tue, Apr 18, 2023 at 12:22?PM Tamar Christina via Gcc-patches > > > wrote: > > > > > > > >

RE: [PATCH 2/3]middle-end match.pd: simplify debug dump checks

2023-04-25 Thread Tamar Christina via Gcc-patches
> On Tue, Apr 18, 2023 at 12:22 PM Tamar Christina via Gcc-patches patc...@gcc.gnu.org> wrote: > > > > Hi All, > > > > This is a small improvement in QoL codegen for match.pd to save time > > not re-evaluating the condition for printing debug information in every

RE: [PATCH] aarch64: Add the cost model for Neoverse N1

2023-04-25 Thread Tamar Christina via Gcc-patches
Thanks Evandro, That one works. I’ll run the new cost model and sched modules through a number of workloads and come back with the results. Cheers, Tamar From: Evandro Menezes Sent: Monday, April 24, 2023 11:52 PM To: Evandro Menezes Cc: Tamar Christina ; evandro+gcc-patc...@gcc.gnu.org;

RE: [PATCH] aarch64: Add the cost model for Neoverse N1

2023-04-24 Thread Tamar Christina via Gcc-patches
Hi Evandro, I wanted to give this patch a try, but the diff seems corrupt, the whitespaces at the start of the context lines seem to have gone missing. Could you try resending it? Thanks, Tamar > -Original Message- > From: Gcc-patches bounces+tamar.christina=arm@gcc.gnu.org> On

RE: [PATCH] RFC: New compact syntax for insn and insn_split in Machine Descriptions

2023-04-24 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, April 21, 2023 6:19 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > > Subject: Re: [PATCH] RFC: New compact syntax for insn and insn_split in > Machine Descriptions > > Tamar Christina

RE: [PATCH 2/3]middle-end match.pd: simplify debug dump checks

2023-04-19 Thread Tamar Christina via Gcc-patches
> On Tue, Apr 18, 2023 at 12:22 PM Tamar Christina via Gcc-patches patc...@gcc.gnu.org> wrote: > > > > Hi All, > > > > This is a small improvement in QoL codegen for match.pd to save time > > not re-evaluating the condition for printing debug information in every

RE: [PATCH 1/3]middle-end match.pd: don't emit label if not needed

2023-04-18 Thread Tamar Christina via Gcc-patches
d > > On Tue, Apr 18, 2023 at 12:21 PM Tamar Christina via Gcc-patches patc...@gcc.gnu.org> wrote: > > > > Hi All, > > > > This is a small QoL codegen improvement for match.pd to not emit > > labels when they are not needed. The codegen is nice and there

[PATCH] RFC: New compact syntax for insn and insn_split in Machine Descriptions

2023-04-18 Thread Tamar Christina via Gcc-patches
Hi All, This patch adds support for a compact syntax for specifying constraints in instruction patterns. Credit for the idea goes to Richard Earnshaw. I am sending up this RFC to get feedback for it's inclusion in GCC 14. With this new syntax we want a clean break from the current limitations to

[PATCH 2/3]middle-end match.pd: simplify debug dump checks

2023-04-18 Thread Tamar Christina via Gcc-patches
Hi All, This is a small improvement in QoL codegen for match.pd to save time not re-evaluating the condition for printing debug information in every function. There is a small but consistent runtime and compile time win here. The runtime win comes from not having to do the condition over again,

[PATCH 2/3] RFC - match.pd: simplify debug dump checks

2023-04-06 Thread Tamar Christina via Gcc-patches
Hi All, Just sending these so people can test the series This is a small improvement in QoL codegen for match.pd to save time not re-evaluating the condition for printing debug information in every function. There is a small but consistent runtime and compile time win here. The runtime win

[PATCH 1/3] RFC match.pd: don't emit label if not needed

2023-04-06 Thread Tamar Christina via Gcc-patches
Hi All, Just sending these so people can test the series. This is a small QoL codegen improvement for match.pd to not emit labels when they are not needed. The codegen is nice and there is a small (but consistent) improvement in compile time. Bootstrapped Regtested on aarch64-none-linux-gnu

[PATCH][committed][testsuite]: move mla_1 test to aarch64 only [PR109118]

2023-03-14 Thread Tamar Christina via Gcc-patches
Hi All, I previously made the test generic, but there's no list of targets that support integer MLA, and so it's not really feasible for me to make this generic. As such I've moved it to be AArch64 only. committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: PR

RE: [PATCH 2/4][ranger]: Add range-ops for widen addition and widen multiplication [PR108583]

2023-03-10 Thread Tamar Christina via Gcc-patches
> >> As Andrew has been advising on this one, I'd prefer for him to review it. > >> However, he's on vacation this week. FYI... > >> > >> Aldy > >> > >> On Mon, Mar 6, 2023 at 12:22 PM Tamar Christina > >> wrote: > >>> Ping. > >>> > >>> And updated the patch to reject cases that we don't expect

RE: [PATCH 3/4]middle-end: Implement preferred_div_as_shifts_over_mult [PR108583]

2023-03-09 Thread Tamar Christina via Gcc-patches
Hi, Here's the respun patch. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR target/108583 * target.def (preferred_div_as_shifts_over_mult): New. * doc/tm.texi.in: Document it. * doc/tm.texi:

RE: [PATCH 2/4][ranger]: Add range-ops for widen addition and widen multiplication [PR108583]

2023-03-09 Thread Tamar Christina via Gcc-patches
Cheers, Thanks! I'll way for him to come back then  Thanks, Tamar > -Original Message- > From: Aldy Hernandez > Sent: Wednesday, March 8, 2023 8:57 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; amacl...@redhat.com > Subject: Re: [PATCH 2/4][ranger]: Add range-ops for

[PATCH]middle-end: don't form FMAs when multiplication is not single use. [PR108583]

2023-03-09 Thread Tamar Christina via Gcc-patches
Hi All, The testcase typedef unsigned int vec __attribute__((vector_size(32))); vec f3 (vec a, vec b, vec c) { vec d = a * b; return d + ((c + d) >> 1); } shows a case where we don't want to form an FMA due to the MUL not being single use. In this case to form an FMA we have to redo the

RE: [PATCH 4/4]AArch64 Update div-bitmask to implement new optab instead of target hook [PR108583]

2023-03-08 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Wednesday, March 8, 2023 9:18 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH 4/4]AArch64 Update div-bitmask to implement new > optab

[PATCH]middle-end: On emergency dumps finish the graph generation.

2023-03-07 Thread Tamar Christina via Gcc-patches
Hi All, When doing an emergency dump the cfg output dumps are corrupted because the ending "}" is missing. Normally when the pass manager finishes it would call finish_graph_dump_file to produce this. This is called here because each pass can dump multiple digraphs. However during an emergency

RE: [PATCH] PR rtl-optimization/106594: Preserve zero_extend in combine when cheap.

2023-03-06 Thread Tamar Christina via Gcc-patches
> Hi! > > On Sun, Mar 05, 2023 at 03:33:40PM -0600, Segher Boessenkool wrote: > > On Sun, Mar 05, 2023 at 08:43:20PM +, Tamar Christina wrote: > > Yes, *look* better: I have seen no proof or indication that this would > > ("looks", I cannot type, sorry) > > > actually generate better code,

  1   2   3   4   5   6   >