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

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

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

2021-06-24 Thread Prathamesh Kulkarni via Gcc-patches
, and 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] PR97906 - Missed lowering abs(a) >= abs(b) to vacge

2021-06-14 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 7 Jun 2021 at 12:46, Prathamesh Kulkarni wrote: > > On Tue, 1 Jun 2021 at 16:03, Prathamesh Kulkarni > wrote: > > > > Hi, > > As mentioned in PR, for following test-case: > > > > #include > > > > uint32x2_t f1(float32x2_t a, float32x2_

Re: [ARM NEON] PR66791: Replace builtins in vceq_* (a, b) with a == b.

2021-06-14 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 9 Jun 2021 at 14:49, Prathamesh Kulkarni wrote: > > Hi, > The attached patch replaces calls to _builtin_neon_vceq (a, b) with a > == b > for integral variants, and for fp variants it gates the equality > comparison on __FAST_MATH__ because for fp variants a == b result

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

2021-06-14 Thread Prathamesh Kulkarni via Gcc-patches
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 Gcc-patches > > wrote: > > > > > > Hi, > > > As mentioned in

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

2021-06-14 Thread Prathamesh Kulkarni via Gcc-patches
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 > > wrote: > > > > > > On Wed, 26 May 2021 at 14:07, Marc Gliss

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-12 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 10 May 2021 at 19:55, Richard Earnshaw wrote: > > > > On 06/05/2021 01:14, Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > > The attached patch replaces __builtin_neon_vtst* (a, b) with (a & b) != 0. > > Bootstrapped and tested on arm-linux

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-12 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 12 May 2021 at 16:02, Richard Earnshaw wrote: > > > > On 12/05/2021 08:46, Prathamesh Kulkarni via Gcc-patches wrote: > > On Mon, 10 May 2021 at 19:55, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 06/05/202

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-13 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 12 May 2021 at 20:33, Richard Earnshaw wrote: > > On 12/05/2021 12:05, Prathamesh Kulkarni via Gcc-patches wrote: > > On Wed, 12 May 2021 at 16:02, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 12/05/2021 08:46, Prathamesh Kul

[PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch replaces __builtin_neon_vtst* (a, b) with (a & b) != 0. Bootstrapped and tested on arm-linux-gnueabihf and cross-tested on arm*-*-*. OK to commit ? Thanks, Prathamesh vtst-1.diff Description: Binary data

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

2021-05-26 Thread Prathamesh Kulkarni via Gcc-patches
lr -.L13: - .align 3 -.L12: - .short 0 - .short 0 - .short 0 - .short 0 .size test_vmul_n_16x8, .-test_vmul_n_16x8 Adjusted the test, to fix the failing tests. OK to commit if testing passes ? Thanks, Prathamesh 2021-26-05 Prathamesh Kulkarni

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

2021-06-07 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 31 May 2021 at 16:01, Prathamesh Kulkarni wrote: > > On Mon, 31 May 2021 at 15:22, Prathamesh Kulkarni > wrote: > > > > On Wed, 26 May 2021 at 14:07, Marc Glisse wrote: > > > > > > On Wed, 26 May 2021, Prathamesh Kulkarni via Gcc-patches wrote: &

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

2021-06-07 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 1 Jun 2021 at 16:03, Prathamesh Kulkarni wrote: > > Hi, > As mentioned in PR, for following test-case: > > #include > > uint32x2_t f1(float32x2_t a, float32x2_t b) > { > return vabs_f32 (a) >= vabs_f32 (b); > } > > uint32x2_t f2(float32x2_t a, fl

[ARM] PR98435: Missed optimization in expanding vector constructor

2021-06-04 Thread Prathamesh Kulkarni via Gcc-patches
Hi, As mentioned in PR, for the following test-case: #include bfloat16x4_t f1 (bfloat16_t a) { return vdup_n_bf16 (a); } bfloat16x4_t f2 (bfloat16_t a) { return (bfloat16x4_t) {a, a, a, a}; } Compiling with arm-linux-gnueabi -O3 -mfpu=neon -mfloat-abi=softfp -march=armv8.2-a+bf16+fp16

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

2021-05-31 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 26 May 2021 at 14:07, Marc Glisse wrote: > > On Wed, 26 May 2021, Prathamesh Kulkarni via Gcc-patches wrote: > > > The attached patch removes calls to builtins in vmul_n* (a, b) with __a * > > __b. > > I am not familiar with neon, but are __a and __b unsigned h

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

2021-05-31 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 31 May 2021 at 15:22, Prathamesh Kulkarni wrote: > > On Wed, 26 May 2021 at 14:07, Marc Glisse wrote: > > > > On Wed, 26 May 2021, Prathamesh Kulkarni via Gcc-patches wrote: > > > > > The attached patch removes calls to builtins in vmul_n* (a, b) wi

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

2021-06-01 Thread Prathamesh Kulkarni via Gcc-patches
ss-tested on arm*-*-*. OK to commit ? Thanks, Prathamesh 2021-06-01 Prathamesh Kulkarni PR target/97906 * config/arm/iterators.md (NEON_VACMP): Remove. * config/arm/neon.md (neon_vca): Use GLTE instead of GTGE iterator. (neon_vca_insn):

[ARM] PR66791: Replace builtins for signed vmul_n intrinsics

2021-07-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi, This patch replaces builtins with __a * __b for signed variants of vmul_n intrinsics. As discussed earlier, the patch has issue if __a * __b overflows, and whether we wish to leave that as UB. Thanks, Prathamesh diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h index

[ARM] PR66791: Replace builtins for fp and unsigned vmul_n intrinsics

2021-07-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi Kyrill, I assume this patch is OK to commit after bootstrap+testing ? Thanks, Prathamesh diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h index f42a15f7912..41b596b5fc6 100644 --- a/gcc/config/arm/arm_neon.h +++ b/gcc/config/arm/arm_neon.h @@ -8384,21 +8384,25 @@

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: [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: 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] 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 builtins for signed vmul_n intrinsics

2021-07-12 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 12 Jul 2021 at 15:23, Prathamesh Kulkarni wrote: > > On Mon, 5 Jul 2021 at 14:47, Prathamesh Kulkarni > wrote: > > > > Hi, > > This patch replaces builtins with __a * __b for signed variants of > > vmul_n intrinsics. > > As discussed earlier, the

Re: [ARM] PR66791: Replace builtins for signed vmul_n intrinsics

2021-07-12 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 5 Jul 2021 at 14:47, Prathamesh Kulkarni wrote: > > Hi, > This patch replaces builtins with __a * __b for signed variants of > vmul_n intrinsics. > As discussed earlier, the patch has issue if __a * __b overflows, and > whether we wish to leave > that as UB. ping ht

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

2021-07-06 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 1 Jul 2021 at 16:26, Prathamesh Kulkarni wrote: > > 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: > >

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] PR98435: Missed optimization in expanding vector constructor

2021-07-06 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 6 Jul 2021 at 13:33, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 06 July 2021 08:06 > > To: Christophe LYON > > Cc: Kyrylo Tkachov ; gcc Patches > patc...@gcc.gnu.org> > &

Re: [PATCH] testsuite/arm: Add mve-vadd-1.c test

2021-04-27 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 27 Apr 2021 at 17:02, Christophe Lyon via Gcc-patches wrote: > > Support for vadd has been present for a while, but it was lacking a > test. > > 2021-04-22 Christophe Lyon > > gcc/testsuite/ > * gcc.target/arm/simd/mve-vadd-1.c: New. > --- >

Re: [PATCH] tree-optimization/99912 - delete trivially dead stmts during DSE

2021-04-27 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 27 Apr 2021 at 19:19, Richard Biener wrote: > > DSE performs a backwards walk over stmts removing stores but it > leaves removing resulting dead SSA defs to later passes. This > eats into its own alias walking budget if the removed stores kept > loads live. The following patch adds

Re: [PR97903][ARM] Missed optimization in lowering to vtst

2021-05-05 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 5 Feb 2021 at 15:42, Kyrylo Tkachov wrote: > > Hi Prathamesh, > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 05 February 2021 09:53 > > To: gcc Patches ; Kyrylo Tkachov > > > > Subject: [PR97903][ARM] Misse

Re: [PR94092] Re: [RFC] test builtin ratio for loop distribution

2021-05-03 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 4 May 2021 at 07:30, Alexandre Oliva wrote: > > On May 3, 2021, Richard Biener wrote: > > > On Fri, Apr 30, 2021 at 4:42 PM Jeff Law wrote: > >> > >> > >> On 4/28/2021 10:26 PM, Alexandre Oliva wrote: > >> > On Feb 22, 2021, Richard Biener wrote: > >> > > >> >> On Fri, Feb 19, 2021 at

[PR97903][ARM] Missed optimization in lowering to vtst

2021-02-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi, For the following test-case: #include uint8x8_t f1(int8x8_t a, int8x8_t b) { return (uint8x8_t) ((a & b) != 0); } gcc fails to lower test operation to vtst, and instead emits: f1: vandd0, d0, d1 vceq.i8 d0, d0, #0 vmvnd0, d0 bx lr The

Re: [PATCH 1/1] libiberty(argv.c): Fix memory leak in expandargv.

2021-02-18 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 18 Feb 2021 at 16:32, Ayush Mittal via Gcc-patches wrote: > > Dynamic memory referenced by 'buffer' was allocated using xmalloc but fails > to free it > when jump to 'error' label. > > Issue as per static analysis tool. > > Signed-off-by: Ayush Mittal > Signed-off-by: Maninder Singh >

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

2021-08-17 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 12 Aug 2021 at 19:04, Christophe Lyon wrote: > > > > On Thu, Aug 12, 2021 at 1:54 PM Prathamesh Kulkarni > wrote: >> >> On Wed, 11 Aug 2021 at 22:23, Christophe Lyon >> wrote: >> > >> > >> > >> > On Thu

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

2021-08-13 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 9 Aug 2021 at 21:50, Christophe Lyon wrote: > > > > On Mon, Aug 9, 2021 at 7:07 AM Prathamesh Kulkarni > wrote: >> >> On Fri, 6 Aug 2021 at 17:31, Christophe Lyon >> wrote: >> > >> > >> > >> > On Fri, Aug 6, 2021 at

Re: [ARM] PR66791: Replace builtins for signed vmul_n intrinsics

2021-08-13 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 5 Aug 2021 at 15:44, Prathamesh Kulkarni wrote: > > On Mon, 12 Jul 2021 at 15:24, Prathamesh Kulkarni > wrote: > > > > On Mon, 12 Jul 2021 at 15:23, Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 5 Jul 2021 at 14:47, Pratham

Re: [ARM] PR66791: Replace builtin in vld1_dup intrinsics

2021-08-13 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 5 Aug 2021 at 15:37, Prathamesh Kulkarni wrote: > > On Thu, 29 Jul 2021 at 19:58, Prathamesh Kulkarni > wrote: > > > > Hi, > > The attached patch replaces builtins in vld1_dup intrinsics with call > > to corresponding vdup_n intrinsic an

Re: [ARM] PR66791: Replace builtin in vld1_dup intrinsics

2021-08-24 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 13 Aug 2021 at 16:40, Prathamesh Kulkarni wrote: > > On Thu, 5 Aug 2021 at 15:37, Prathamesh Kulkarni > wrote: > > > > On Thu, 29 Jul 2021 at 19:58, Prathamesh Kulkarni > > wrote: > > > > > > Hi, > > > The attached pa

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

2021-08-24 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 17 Aug 2021 at 11:55, Prathamesh Kulkarni wrote: > > On Thu, 12 Aug 2021 at 19:04, Christophe Lyon > wrote: > > > > > > > > On Thu, Aug 12, 2021 at 1:54 PM Prathamesh Kulkarni > > wrote: > >> > >>

Re: [ARM] PR66791: Replace builtins for signed vmul_n intrinsics

2021-08-24 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 13 Aug 2021 at 16:40, Prathamesh Kulkarni wrote: > > On Thu, 5 Aug 2021 at 15:44, Prathamesh Kulkarni > wrote: > > > > On Mon, 12 Jul 2021 at 15:24, Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 12 Jul 2021 at 15:23, Prathamesh Kulkarn

Re: [PATCH] More NEGATE_EXPR folding in match.pd

2021-09-09 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 9 Sept 2021 at 15:38, Roger Sayle wrote: > > > As observed by Jakub in comment #2 of PR 98865, the expression -(a>>63) > is optimized in GENERIC but not in GIMPLE. Investigating further it > turns out that this is one of a few transformations performed by > fold_negate_expr in

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

2021-09-03 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 2 Sept 2021 at 14:32, Christophe Lyon wrote: > > > > On Tue, Aug 24, 2021 at 10:17 AM Kyrylo Tkachov > wrote: >> >> >> >> > -Original Message- >> > From: Prathamesh Kulkarni >> > Sent: 24 August 2021 09:01 >> >

Re: [ARM] PR66791: Replace builtins for fp and unsigned vmul_n intrinsics

2021-07-15 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 15 Jul 2021 at 14:47, Christophe Lyon wrote: > > Hi Prathamesh, > > On Mon, Jul 5, 2021 at 11:25 AM Kyrylo Tkachov via Gcc-patches > wrote: >> >> >> >> > -Original Message- >> > From: Prathamesh Kulkarni >> > Se

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

2021-08-03 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 3 Aug 2021 at 14:59, Christophe Lyon wrote: > > > > On Tue, Jul 6, 2021 at 11:26 AM Prathamesh Kulkarni via Gcc-patches > wrote: >> >> On Tue, 6 Jul 2021 at 13:33, Kyrylo Tkachov wrote: >> > >> > >> > >> > > -Origi

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

2021-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 3 Aug 2021 at 20:52, Christophe Lyon wrote: > > > > On Tue, Aug 3, 2021 at 12:57 PM Prathamesh Kulkarni > wrote: >> >> On Tue, 3 Aug 2021 at 14:59, Christophe Lyon >> wrote: >> > >> > >> > >> > On Tue, Jul

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

2021-08-08 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 6 Aug 2021 at 17:31, Christophe Lyon wrote: > > > > On Fri, Aug 6, 2021 at 11:51 AM Prathamesh Kulkarni > wrote: >> >> On Fri, 6 Aug 2021 at 14:49, Christophe Lyon >> wrote: >> > >> > >> > >> > On Fri, Aug 6, 2021 at

Re: [ARM] PR66791: Replace builtins for fp and unsigned vmul_n intrinsics

2021-08-09 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 3 Aug 2021 at 18:23, Christophe Lyon wrote: > > > > On Mon, Jul 19, 2021 at 2:34 PM Prathamesh Kulkarni > wrote: >> >> On Thu, 15 Jul 2021 at 16:46, Prathamesh Kulkarni >> wrote: >> > >> > On Thu, 15 Jul 2021 at 14:47, Chris

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

2021-08-06 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 6 Aug 2021 at 14:49, Christophe Lyon wrote: > > > > On Fri, Aug 6, 2021 at 11:00 AM Prathamesh Kulkarni > wrote: >> >> On Thu, 5 Aug 2021 at 18:05, Christophe Lyon >> wrote: >> > >> > >> > >> > On Thu, Aug 5, 2021 a

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

2021-08-12 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 11 Aug 2021 at 22:23, Christophe Lyon wrote: > > > > On Thu, Jun 24, 2021 at 6:29 PM Kyrylo Tkachov via Gcc-patches > wrote: >> >> >> >> > -Original Message- >> > From: Prathamesh Kulkarni >> > Sent: 24 June 2021 12

Re: [ARM] PR66791: Replace builtins in vld1

2021-07-29 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 29 Jul 2021 at 14:57, Kyrylo Tkachov wrote: > > Hi Prathamesh, > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 26 July 2021 22:24 > > To: gcc Patches ; Kyrylo Tkachov > > ; Richard Earnshaw > > > > Subject:

[ARM] PR66791: Replace builtin in vld1_dup intrinsics

2021-07-29 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch replaces builtins in vld1_dup intrinsics with call to corresponding vdup_n intrinsic and removes entry for vld1_dup from arm_neon_builtins.def. Bootstrapped+tested on arm-linux-gnueabihf. OK to commit ? Thanks, Prathamesh gcc/ChangeLog: PR target/66791 *

Re: [ARM] PR66791: Replace builtins for signed vmul_n intrinsics

2021-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 12 Jul 2021 at 15:24, Prathamesh Kulkarni wrote: > > On Mon, 12 Jul 2021 at 15:23, Prathamesh Kulkarni > wrote: > > > > On Mon, 5 Jul 2021 at 14:47, Prathamesh Kulkarni > > wrote: > > > > > > Hi, > > > This patch replaces built

Re: [ARM] PR66791: Replace builtin in vld1_dup intrinsics

2021-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 29 Jul 2021 at 19:58, Prathamesh Kulkarni wrote: > > Hi, > The attached patch replaces builtins in vld1_dup intrinsics with call > to corresponding vdup_n intrinsic and removes entry for vld1_dup from > arm_neon_builtins.def. > Bootstrapped+tested on arm-linux-gnueabi

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

2021-08-06 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 5 Aug 2021 at 18:05, Christophe Lyon wrote: > > > > On Thu, Aug 5, 2021 at 2:28 PM Prathamesh Kulkarni > wrote: >> >> On Tue, 3 Aug 2021 at 20:52, Christophe Lyon >> wrote: >> > >> > >> > >> > On Tue, Aug 3, 2021 at

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-12 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 11 Oct 2021 at 20:42, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Fri, 8 Oct 2021 at 21:19, Richard Sandiford > > wrote: > >> > >> Thanks for looking at this. > >> > >> Prathamesh Kulkarni writes: > >&g

Re: [SVE] Adjust PR93183 test-case to compile with -march=armv8.3-a+sve

2021-10-19 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 19 Oct 2021 at 13:32, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch removes "-mcpu=generic+sve" from dg-options, > > because it conflicts > > with -march=armv8.3-a+sve, and resulted in: > > > >

[SVE] Adjust PR93183 test-case to compile with -march=armv8.3-a+sve

2021-10-19 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch removes "-mcpu=generic+sve" from dg-options, because it conflicts with -march=armv8.3-a+sve, and resulted in: cc1: warning: switch '-mcpu=generic+sve' conflicts with '-march=armv8.3-a+sve' switch^M FAIL: gcc.target/aarch64/sve/pr93183.c (test for excess errors) Excess

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-19 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Oct 2021 at 17:23, Richard Biener wrote: > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > On Mon, 18 Oct 2021 at 17:10, Richard Biener wrote: > > > > > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > > > > &g

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-19 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 19 Oct 2021 at 13:02, Richard Biener wrote: > > On Tue, Oct 19, 2021 at 9:03 AM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > On Mon, 18 Oct 2021 at 17:23, Richard Biener wrote: > > > > > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: >

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-20 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 19 Oct 2021 at 19:58, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch emits a more verbose diagnostic for target attribute that > > is an architecture extension needing a leading '+'. > > > > For the fol

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-20 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 19 Oct 2021 at 16:55, Richard Biener wrote: > > On Tue, 19 Oct 2021, Prathamesh Kulkarni wrote: > > > On Tue, 19 Oct 2021 at 13:02, Richard Biener > > wrote: > > > > > > On Tue, Oct 19, 2021 at 9:03 AM Prathamesh Kulkarni via Gcc-patches > >

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-11 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 8 Oct 2021 at 21:19, Richard Sandiford wrote: > > Thanks for looking at this. > > Prathamesh Kulkarni writes: > > Hi, > > As mentioned in PR, for the following test-case: > > > > typedef unsigned char uint8_t; > > > > sta

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 13 Oct 2021 at 13:26, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Mon, 11 Oct 2021 at 20:42, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Fri, 8 Oct 2021 at 21:19, Richard Sandiford &

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Oct 2021 at 16:18, Richard Biener wrote: > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > Hi Richard, > > As suggested in PR, I have attached WIP patch that adds two patterns > > to match.pd: > > erfc(x) --> 1 - erf(x) if canonicalize_mat

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Oct 2021 at 17:10, Richard Biener wrote: > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > On Mon, 18 Oct 2021 at 16:18, Richard Biener wrote: > > > > > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > > > > > Hi Ri

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Oct 2021 at 14:34, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > > b/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > > index 4604365fbef..cedc5b7c549 100644 > >

[aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch emits a more verbose diagnostic for target attribute that is an architecture extension needing a leading '+'. For the following test, void calculate(void) __attribute__ ((__target__ ("sve"))); With patch, the compiler now emits: 102376.c:1:1: error: arch extension ‘sve’

[match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, As suggested in PR, I have attached WIP patch that adds two patterns to match.pd: erfc(x) --> 1 - erf(x) if canonicalize_math_p() and, 1 - erf(x) --> erfc(x) if !canonicalize_math_p(). This works to remove call to erfc for the following test: double f(double x) { double g(double,

[SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-06 Thread Prathamesh Kulkarni via Gcc-patches
Hi, As mentioned in PR, for the following test-case: typedef unsigned char uint8_t; static inline uint8_t x264_clip_uint8(uint8_t x) { uint8_t t = -x; uint8_t t1 = x & ~63; return (t1 != 0) ? t : x; } void mc_weight(uint8_t *restrict dst, uint8_t *restrict src, int n) { for (int x = 0;

[gimple-isel] Remove redundant if condition

2021-10-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi, In gimple_expand_vec_cond_expr: icode = get_vcond_icode (mode, cmp_op_mode, unsignedp); if (icode == CODE_FOR_nothing) { if (tcode == LT_EXPR && op0a == op0) { /* A VEC_COND_EXPR condition could be folded from EQ_EXPR/NE_EXPR into a

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-22 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 20 Oct 2021 at 18:21, Richard Biener wrote: > > On Wed, 20 Oct 2021, Prathamesh Kulkarni wrote: > > > On Tue, 19 Oct 2021 at 16:55, Richard Biener wrote: > > > > > > On Tue, 19 Oct 2021, Prathamesh Kulkarni wrote: > > > > > > > On Tue

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-22 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 22 Oct 2021 at 14:56, Richard Biener wrote: > > On Fri, 22 Oct 2021, Prathamesh Kulkarni wrote: > > > On Wed, 20 Oct 2021 at 18:21, Richard Biener wrote: > > > > > > On Wed, 20 Oct 2021, Prathamesh Kulkarni wrote: > > > > > > &g

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-22 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 20 Oct 2021 at 15:05, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 19 Oct 2021 at 19:58, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > Hi, > >> > The attache

[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

[1/2] PR96463 - aarch64 specific changes

2021-12-17 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The patch folds: lhs = svld1rq ({-1, -1, -1, ...}, [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 (), [0]); } it generates following

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, ...}, [0]) > > into: > > lhs = vec_perm_expr > > and expands above vec_perm_expr using aarch64_expand_s

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: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-17 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 16 Nov 2021 at 03:42, David Malcolm wrote: > > On Mon, 2021-11-15 at 12:33 +0530, Prathamesh Kulkarni wrote: > > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > > wrote: > > > > > > This patch adds two new attributes. The followup pat

Re: [PATCH] Combine malloc + memset to calloc

2021-11-13 Thread Prathamesh Kulkarni via Gcc-patches
On Sat, 13 Nov 2021 at 02:00, Seija K. via Gcc-patches wrote: > > diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c > index a2dd4895d48..25d9acda752 100644 > --- a/gcc/ada/terminals.c > +++ b/gcc/ada/terminals.c > @@ -609,8 +609,7 @@ __gnat_setup_communication (struct TTY_Process** >

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-14 Thread Prathamesh Kulkarni via Gcc-patches
On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches wrote: > > This patch adds two new attributes. The followup patch makes use of > the attributes in -fanalyzer. > > gcc/c-family/ChangeLog: > * c-attribs.c (attr_noreturn_exclusions): Add > "returns_zero_on_failure" and

Re: [PATCH 1/3] gimple-fold: Transform stp*cpy_chk to str*cpy directly

2021-11-12 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 12 Nov 2021 at 01:12, Siddhesh Poyarekar wrote: > > Avoid going through another folding cycle and use the ignore flag to > directly transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set, > likewise for BUILT_IN_STPNCPY_CHK to BUILT_IN_STPNCPY. > > Dump the transformation in dump_file

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-11-11 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 9 Nov 2021 at 20:27, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Thu, 4 Nov 2021 at 14:19, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Wed, 20 Oct 2021 at 15:05, Richard Sandiford &g

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-28 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 22 Oct 2021 at 14:41, Prathamesh Kulkarni wrote: > > On Wed, 20 Oct 2021 at 15:05, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > On Tue, 19 Oct 2021 at 19:58, Richard Sandiford > > > wrote: > > >&

Re: [PATCH] Introduce build_debug_expr_decl

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 8 Nov 2021 at 23:24, Martin Jambor wrote: > > Hi, > > this patch introduces a helper function build_debug_expr_decl to build > DEBUG_EXPR_DECL tree nodes in the most common way and replaces with a > call of this function all code pieces which build such a DECL itself > and sets its mode

Re: [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 8 Nov 2021 at 16:42, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 12:06 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi, > > The attached patch removes redundant check for number of loops in > > pass_vectorize::execute, > &

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-11-04 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 28 Oct 2021 at 21:33, Martin Sebor wrote: > > On 10/28/21 2:59 AM, Prathamesh Kulkarni via Gcc-patches wrote: > > On Fri, 22 Oct 2021 at 14:41, Prathamesh Kulkarni > > wrote: > >> > >> On Wed, 20 Oct 2021 at 15:05, Richard Sandiford > >> w

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 4 Nov 2021 at 14:19, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Wed, 20 Oct 2021 at 15:05, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Tue, 19 Oct 2021 at 19:58, Richard Sandiford &g

[tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch removes redundant check for number of loops in pass_vectorize::execute, since it only calls vectorize_loops, and in vectorize_loops, we immediately bail out if no loops are present: vect_loops_num = number_of_loops (cfun); /* Bail out if there are no loops. */ if

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

Re: [SVE] PR96463 - Optimise svld1rq from vectors

2021-12-07 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 2 Dec 2021 at 23:11, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi Richard, > > I have attached a WIP untested patch for PR96463. > > IIUC, the PR suggests to transform > > lhs = svld1rq ({-1, -1, ...}, [0]) > > into: > > l

[SVE] PR96463 - Optimise svld1rq from vectors

2021-12-02 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, I have attached a WIP untested patch for PR96463. IIUC, the PR suggests to transform lhs = svld1rq ({-1, -1, ...}, [0]) into: lhs = vec_perm_expr if v is vector of 4 elements, and each element is 32 bits on little endian target ? I am sorry if this sounds like a silly question, but I

Re: [ARM] PR66791: Replace builtins for fp and unsigned vmul_n intrinsics

2021-07-19 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 15 Jul 2021 at 16:46, Prathamesh Kulkarni wrote: > > On Thu, 15 Jul 2021 at 14:47, Christophe Lyon > wrote: > > > > Hi Prathamesh, > > > > On Mon, Jul 5, 2021 at 11:25 AM Kyrylo Tkachov via Gcc-patches > > wrote: > >> > >> >

Re: [ARM] PR66791: Replace builtins in vshl_n

2021-07-22 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 22 Jul 2021 at 16:03, Richard Earnshaw wrote: > > > > On 22/07/2021 08:45, Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > > The attached patch removes calls to builtins from vshl_n intrinsics, > > and replacing them > > with left shift opera

Re: [ARM] PR66791: Replace builtins in vshl_n

2021-07-22 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 22 Jul 2021 at 17:28, Richard Earnshaw wrote: > > > > On 22/07/2021 12:32, Prathamesh Kulkarni wrote: > > On Thu, 22 Jul 2021 at 16:03, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 22/07/2021 08:45, Prathamesh Kulkar

[ARM] PR66791: Replace builtins in vshl_n

2021-07-22 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch removes calls to builtins from vshl_n intrinsics, and replacing them with left shift operator. The patch passes bootstrap+test on arm-linux-gnueabihf. Altho, I noticed, that the patch causes 3 extra registers to spill using << instead of the builtin for vshl_n.c. Could that

Re: [ARM] PR66791: Replace builtins in vshl_n

2021-07-23 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 22 Jul 2021 at 20:29, Richard Earnshaw wrote: > > > > On 22/07/2021 14:47, Prathamesh Kulkarni via Gcc-patches wrote: > > On Thu, 22 Jul 2021 at 17:28, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 22/07/2021 12:32, P

Re: [ARM] PR66791: Replace builtins in vshl_n

2021-07-23 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 23 Jul 2021 at 15:02, Richard Earnshaw wrote: > > On 23/07/2021 08:04, Prathamesh Kulkarni via Gcc-patches wrote: > > On Thu, 22 Jul 2021 at 20:29, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 22/07/2021 14:47, Prathamesh Kul

<    3   4   5   6   7   8   9   10   >