Re: [PATCH] c++: fix ICE on invalid attributes [PR96637]

2022-05-24 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 29 Apr 2022 at 19:44, Marek Polacek via Gcc-patches wrote: > > This patch fixes crashes with invalid attributes. Arguably it could > make sense to assert seen_error() too. > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk = GCC 13? > > PR c++/96637 > >

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-24 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 23 May 2022 at 18:14, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Wed, 18 May 2022 at 17:27, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > Hi, > >> > The attached patch adds anot

Re: [PATCH] tree-optimization/100221 - improve DSE a bit

2022-05-24 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 24 May 2022 at 11:50, Richard Biener via Gcc-patches wrote: > > When facing multiple PHI defs and one feeding the other we can > postpone processing uses of one and thus can proceed. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > > 2022-05-20 Richard Biener > >

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

2022-05-23 Thread Prathamesh Kulkarni via Gcc-patches
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 Tue, 3 May 2022 at 18:25, Richard Sandiford > > > wrote: > > >> > > >>

Adjust affected targets for vec_perm_const hook

2022-05-23 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, The attached patch addresses formatting nits for affected targets. Tested with make all-gcc stage1 (except for gcn). Sorry if this sounds like a naive question, but what target triplet should I use to build gcn port ? Thanks, Prathamesh diff --git a/gcc/config/aarch64/aarch64.cc

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-23 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 18 May 2022 at 17:27, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch adds another parameter machine_mode op_mode to > > vec_perm_const > > hook to specify mode of input operands. The motivation for doing this >

[8/9] s390 changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[7/9] ia64 changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[6/9] sparc changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[5/9] mips changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[4/9] rs6000 changes to vec_perm_const hook.

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html OK to commit if bootstrap+test passes ? Thanks, Prathamesh diff --git a/gcc/config/rs6000/rs6000.cc

[3/9] i386 changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Bootstrapped+tested on x86_64-linux-gnu. OK to commit ? Thanks, Prathamesh diff --git a/gcc/config/i386/i386-expand.cc

[2/9] ARM changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html OK to commit if bootstrap+test passes ? Thanks, Prathamesh diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc

[1/9] AArch64 changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For now, it bails out if vmode != op_mode, in follow-up patch to PR96463, I will add dup as exception. Bootstrapped+tested on aarch64-linux-gnu. Does it look OK ? Thanks, Prathamesh diff --git

[0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adds another parameter machine_mode op_mode to vec_perm_const hook to specify mode of input operands. The motivation for doing this is PR96463, where we create vec_perm_expr of the form: lhs = vec_perm_expr where lhs and rhs have different vector types but same element type

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

2022-05-12 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 11 May 2022 at 12:44, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Fri, 6 May 2022 at 16:00, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > diff --git a/gcc/config/aarch64/aarch64-sve-built

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

2022-05-11 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 6 May 2022 at 16:00, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc > > b/gcc/config/aarch64/aarch64-sve-builtins-base.cc > > index c24c0548724..1ef4ea2087b 100644 > > --- a/

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

2022-05-09 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 9 May 2022 at 19:22, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 3 May 2022 at 18:25, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Tue, 4 Jan 2022 at 19:12, Richard Sandiford >

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

2022-05-09 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 3 May 2022 at 18:25, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 4 Jan 2022 at 19:12, Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Tue, 4 Jan 2022, Richard Sandiford wrote: > >&g

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

2022-05-03 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 4 Jan 2022 at 19:12, Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, 4 Jan 2022, Richard Sandiford wrote: > > > >> Richard Biener writes: > >> > On Fri, 17 Dec 2021, Richard Sandiford wrote: > >> > > >> >>

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

2022-05-03 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 27 Dec 2021 at 15:54, Prathamesh Kulkarni wrote: > > On Fri, 17 Dec 2021 at 17:03, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > Hi, > > > The patch folds: > > > lhs = svld1rq ({-1, -1, -1, ...}, [0]) > > >

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: [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

[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: [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: [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 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] 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 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: [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: [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

[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: [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

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-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: [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

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-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: [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-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: [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: > > > >

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

[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-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: [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

[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’

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 > >

[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,

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: [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] [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

[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: [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 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: [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 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] 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 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] 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 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 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-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] 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] 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: [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] 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-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] 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 *

[ARM] PR66791: Replace builtins in vld1

2021-07-26 Thread Prathamesh Kulkarni via Gcc-patches
: ldrdr0, [r0] bx lr I assume the code-gen after patch is correct, since it loads two consecutive words from [r0] into r0 and r1 ? Bootstrapped+tested on arm-linux-gnueabihf. OK to commit ? Thanks, Prathamesh 2021-07-27 Prathamesh Kulkarni PR target/66791

Re: [PATCH] Analyzer: Refactor callstring to work with pairs of supernodes.

2021-07-25 Thread Prathamesh Kulkarni via Gcc-patches
On Sun, 25 Jul 2021 at 16:03, Ankur Saini via Gcc-patches wrote: > > Here is the new patch after fixing all the issues pointed out in the previous > version. Just a nitpick: +/* call_string::element_t's inequality operator. */ +bool +call_string::element_t::operator!= (const

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

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-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

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

[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 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 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] 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 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: [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: > >

[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] 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] 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-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: 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] 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

[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

<    1   2   3   4   5   6   7   8   9   10   >