Re: [1/2] PR96463 - aarch64 specific changes

2022-05-31 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 12 May 2022 at 16:15, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Wed, 11 May 2022 at 12:44, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Fri, 6 May 2022 at 16:00, Richard Sandiford &g

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2022-05-31 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 23 May 2022 at 22:57, Prathamesh Kulkarni wrote: > > On Mon, 9 May 2022 at 21:21, Prathamesh Kulkarni > wrote: > > > > On Mon, 9 May 2022 at 19:22, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni writes: > > > > On T

Re: [1/2] PR96463 - aarch64 specific changes

2022-06-05 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 1 Jun 2022 at 14:12, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Thu, 12 May 2022 at 16:15, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Wed, 11 May 2022 at 12:44, Richard Sandiford &g

Re: [1/2] PR96463 - aarch64 specific changes

2022-06-07 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 6 Jun 2022 at 16:29, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > >> > { > >> >/* The pattern matching functions above are written to look for a > >> > small > >> > number to begin the sequence (0, 1, N/2).

[statistics.cc] Emit asm name of function with -fdump-statistics-asmname

2022-06-16 Thread Prathamesh Kulkarni via Gcc-patches
Hi, I just noticed -fdump-statistics supports asmname sub-option, which according to the doc states: "If DECL_ASSEMBLER_NAME has been set for a given decl, use that in the dump instead of DECL_NAME. Its primary use is ease of use working backward from mangled names in the assembly file." When pass

Re: [statistics.cc] Emit asm name of function with -fdump-statistics-asmname

2022-06-26 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 20 Jun 2022 at 12:52, Richard Biener wrote: > > On Thu, Jun 16, 2022 at 5:05 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi, > > I just noticed -fdump-statistics supports asmname sub-option, which > > according to the doc states: > > &qu

Re: [ARM] PR97906 - Missed lowering abs(a) >= abs(b) to vacge

2021-06-16 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 14 Jun 2021 at 16:15, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 14 June 2021 08:58 > > To: gcc Patches ; Kyrylo Tkachov > > > > Subject: Re: [ARM] PR97906 - Missed lowering abs(a) >

Re: [ARM] PR97906 - Missed lowering abs(a) >= abs(b) to vacge

2021-06-21 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 16 Jun 2021 at 15:49, Prathamesh Kulkarni wrote: > > On Mon, 14 Jun 2021 at 16:15, Kyrylo Tkachov wrote: > > > > > > > > > -Original Message- > > > From: Prathamesh Kulkarni > > > Sent: 14 June 2021 08:58 > > > To:

Re: [ARM] PR98435: Missed optimization in expanding vector constructor

2021-06-21 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 14 Jun 2021 at 13:31, Prathamesh Kulkarni wrote: > > On Wed, 9 Jun 2021 at 15:58, Prathamesh Kulkarni > wrote: > > > > On Fri, 4 Jun 2021 at 13:15, Christophe Lyon > > wrote: > > > > > > On Fri, 4 Jun 2021 at 09:27, Prathamesh Kulkarni via

Re: [ARM] PR66791: Replace calls to builtin in vmul_n (a, b) intrinsics with __a * __b

2021-06-21 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 14 Jun 2021 at 13:27, Prathamesh Kulkarni wrote: > > On Mon, 7 Jun 2021 at 12:45, Prathamesh Kulkarni > wrote: > > > > On Mon, 31 May 2021 at 16:01, Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 31 May 2021 at 15:22, Prathamesh Kulkarni

[ARM] PR66791: Gate comparison in vca intrinsics on __FAST_MATH__

2021-06-22 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch gates abs(__a) cmp abs(__b) for vca intrinsics on __FAST_MATH__. I moved vabs intrinsics before vcage_f32 since vca intrinsics use those. Bootstrapped+tested on arm-linux-gnueabihf. OK to commit ? Thanks, Prathamesh 2021-06-22 Prathamesh Kulkarni PR target/66791

[gitignore] Add cscope.out to .gitignore

2021-06-23 Thread Prathamesh Kulkarni via Gcc-patches
Hi, This patch adds an entry for cscope.out in .gitignore. OK to commit ? Thanks, Prathamesh ignore-cscope.diff Description: Binary data

[ARM] PR66791: Replace builtins for vdup_n and vmov_n intrinsics

2021-06-24 Thread Prathamesh Kulkarni via Gcc-patches
posted a fix for it here: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572648.html Thanks, Prathamesh 2021-06-24 Prathamesh Kulkarni PR target/66791 * gcc/config/arm/arm_neon.h (vdup_n_s8): Replace call to builtin with constructor. (vdup_n_s16): Likewise

Re: [ARM] PR98435: Missed optimization in expanding vector constructor

2021-06-28 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 24 Jun 2021 at 22:01, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 14 June 2021 09:02 > > To: Christophe Lyon > > Cc: gcc Patches ; Kyrylo Tkachov > > > > Subject: Re: [AR

Re: [ARM] PR66791: Gate comparison in vca intrinsics on __FAST_MATH__

2021-06-29 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 22 Jun 2021 at 15:04, Prathamesh Kulkarni wrote: > > Hi, > The attached patch gates abs(__a) cmp abs(__b) for vca intrinsics on > __FAST_MATH__. I moved vabs intrinsics before vcage_f32 since vca > intrinsics use those. > Bootstrapped+tested on arm-linux-gnueabihf. >

Re: [ARM] PR66791: Replace calls to builtin in vmul_n (a, b) intrinsics with __a * __b

2021-06-29 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 21 Jun 2021 at 14:04, Prathamesh Kulkarni wrote: > > On Mon, 14 Jun 2021 at 13:27, Prathamesh Kulkarni > wrote: > > > > On Mon, 7 Jun 2021 at 12:45, Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 31 May 2021 at 16:01, Prathamesh Kulkarni

Re: [ARM] PR98435: Missed optimization in expanding vector constructor

2021-06-29 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 28 Jun 2021 at 14:48, Christophe LYON wrote: > > > On 28/06/2021 10:40, Kyrylo Tkachov via Gcc-patches wrote: > > > >> -Original Message----- > >> From: Prathamesh Kulkarni > >> Sent: 28 June 2021 09:38 > >> To: Kyrylo Tkach

Re: [ARM] PR66791: Gate comparison in vca intrinsics on __FAST_MATH__

2021-06-30 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 30 Jun 2021 at 14:00, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 29 June 2021 08:21 > > To: gcc Patches ; Kyrylo Tkachov > > > > Subject: Re: [ARM] PR66791: Gate comparison in vca intri

Re: [ARM] PR98435: Missed optimization in expanding vector constructor

2021-07-01 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 30 Jun 2021 at 20:51, Christophe LYON wrote: > > > On 29/06/2021 12:46, Prathamesh Kulkarni wrote: > > On Mon, 28 Jun 2021 at 14:48, Christophe LYON > > wrote: > >> > >> On 28/06/2021 10:40, Kyrylo Tkachov via Gcc-patches wrote: > >>>&

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-11-21 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 4 Nov 2022 at 14:00, Prathamesh Kulkarni wrote: > > On Mon, 31 Oct 2022 at 15:27, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > On Wed, 26 Oct 2022 at 21:07, Richard Sandiford > > > wrote: > > >> > > >&

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-11-28 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 21 Nov 2022 at 14:37, Prathamesh Kulkarni wrote: > > On Fri, 4 Nov 2022 at 14:00, Prathamesh Kulkarni > wrote: > > > > On Mon, 31 Oct 2022 at 15:27, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni writes: > >

[aarch64] Use dup and zip1 for interleaving elements in initializing vector

2022-11-29 Thread Prathamesh Kulkarni via Gcc-patches
Hi, For the following test-case: int16x8_t foo(int16_t x, int16_t y) { return (int16x8_t) { x, y, x, y, x, y, x, y }; } Code gen at -O3: foo: dupv0.8h, w0 ins v0.h[1], w1 ins v0.h[3], w1 ins v0.h[5], w1 ins v0.h[7], w1 ret For

Re: [aarch64] Use dup and zip1 for interleaving elements in initializing vector

2022-11-29 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 29 Nov 2022 at 20:43, Andrew Pinski wrote: > > On Tue, Nov 29, 2022 at 6:40 AM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi, > > For the following test-case: > > > > int16x8_t foo(int16_t x, int16_t y) > > { > > return (in

[aarch64] PR107920 - Fix incorrect handling of virtual operands in svld1rq_impl::fold

2022-12-01 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The following test: #include "arm_sve.h" svint8_t test_s8(int8_t *x) { return svld1rq_s8 (svptrue_b8 (), &x[0]); } ICE's with -march=armv8.2-a+sve -O1 -fno-tree-ccp -fno-tree-forwprop: during GIMPLE pass: fre pr107920.c: In function ‘test_s8’: pr107920.c:7:1: internal compiler error: in ex

Re: [PATCH] tree, c++: optimize walk_tree_1 and cp_walk_subtrees

2022-12-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 5 Dec 2022 at 09:51, Patrick Palka via Gcc-patches wrote: > > These functions currently repeatedly dereference tp during the subtree > walk, dereferences which the compiler can't CSE because it can't > guarantee that the subtree walking doesn't modify *tp. > > But we already implicitly req

Re: [aarch64] Use dup and zip1 for interleaving elements in initializing vector

2022-12-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 5 Dec 2022 at 16:50, Richard Sandiford wrote: > > Richard Sandiford via Gcc-patches writes: > > Prathamesh Kulkarni writes: > >> Hi, > >> For the following test-case: > >> > >> int16x8_t foo(int16_t x, int16_t y) > >

Re: [aarch64] PR107920 - Fix incorrect handling of virtual operands in svld1rq_impl::fold

2022-12-05 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 6 Dec 2022 at 00:08, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The following test: > > > > #include "arm_sve.h" > > > > svint8_t > > test_s8(int8_t *x) > > { > > return svld1rq_s8 (svptrue

Re: [SVE] PR96463 - Optimise svld1rq from vectors

2021-12-14 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 7 Dec 2021 at 19:08, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Thu, 2 Dec 2021 at 23:11, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > Hi Richard, > >> > I have attached a WIP

[1/2] PR96463 - aarch64 specific changes

2021-12-17 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The patch folds: lhs = svld1rq ({-1, -1, -1, ...}, &v[0]) into: lhs = vec_perm_expr and expands above vec_perm_expr using aarch64_expand_sve_dupq. With patch, for following test: #include #include svint32_t foo (int32x4_t x) { return svld1rq (svptrue_b8 (), &x[0]); } it generates followi

[2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2021-12-17 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch rearranges order of type-check for vec_perm_expr and relaxes type checking for lhs = vec_perm_expr when: rhs1 == rhs2, lhs is variable length vector, rhs1 is fixed length vector, TREE_TYPE (lhs) == TREE_TYPE (rhs1) I am not sure tho if this check is correct ? My intent was

Re: [1/2] PR96463 - aarch64 specific changes

2021-12-27 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 17 Dec 2021 at 17:03, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The patch folds: > > lhs = svld1rq ({-1, -1, -1, ...}, &v[0]) > > into: > > lhs = vec_perm_expr > > and expands above vec_perm_expr using aarch64_expa

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2021-12-27 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 17 Dec 2021 at 16:37, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch rearranges order of type-check for vec_perm_expr > > and relaxes type checking for > > lhs = vec_perm_expr > > > > when: > >

Re: [aarch64] Use dup and zip1 for interleaving elements in initializing vector

2023-04-03 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 13 Mar 2023 at 13:03, Richard Biener wrote: > > On Fri, 10 Mar 2023, Richard Sandiford wrote: > > > Sorry for the slow reply. > > > > Prathamesh Kulkarni writes: > > > Unfortunately it regresses code-gen for the following case: > > > > >

Re: [aarch64] Code-gen for vector initialization involving constants

2023-04-03 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 13 Feb 2023 at 11:58, Prathamesh Kulkarni wrote: > > On Fri, 3 Feb 2023 at 12:46, Prathamesh Kulkarni > wrote: > > > > Hi Richard, > > While digging thru aarch64_expand_vector_init, I noticed it gives > > priority to loading a constant first: > >

[match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi, For the following test: svint32_t f(svint32_t v) { return svrev_s32 (svrev_s32 (v)); } We generate 2 rev instructions instead of nop: f: rev z0.s, z0.s rev z0.s, z0.s ret The attached patch tries to fix that by trying to recognize the following pattern in ma

Re: [aarch64] Use dup and zip1 for interleaving elements in initializing vector

2023-04-06 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 4 Apr 2023 at 23:35, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Mon, 13 Mar 2023 at 13:03, Richard Biener wrote: > >> On GIMPLE it would be > >> > >> _1 = { a, ... }; // (a) > >> _2 = { _1, ... }; // (b) > >

Re: [aarch64] Use dup and zip1 for interleaving elements in initializing vector

2023-04-06 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 6 Apr 2023 at 16:05, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 4 Apr 2023 at 23:35, Richard Sandiford > > wrote: > >> > diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc > >> > b/gcc/config/aarch64

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-11 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 11 Apr 2023 at 14:17, Richard Biener wrote: > > On Wed, Apr 5, 2023 at 10:39 AM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi, > > For the following test: > > > > svint32_t f(svint32_t v) > > { > > return svrev_s32 (svrev_s32

<    6   7   8   9   10   11