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

[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] testsuite: aarch64: Adjust SVE ACLE tests to new generated code

2023-08-24 Thread Prathamesh Kulkarni via Gcc-patches
emps -DTEST_OVERLOADS > check-function-bodies subr_m1_u8_m > > Andrew Pinski's analysis in PR testsuite/111071 is that the new code is > better and the testcase should be updated. I also asked Prathamesh Kulkarni > in private and he agreed. > > Here is the update. With th

[AArch64][testsuite] Adjust vect_copy_lane_1.c for new code-gen

2023-09-13 Thread Prathamesh Kulkarni via Gcc-patches
Hi, After 27de9aa152141e7f3ee66372647d0f2cd94c4b90, there's a following regression: FAIL: gcc.target/aarch64/vect_copy_lane_1.c scan-assembler-times ins\\tv0.s\\[1\\], v1.s\\[0\\] 3 This happens because for the following function from vect_copy_lane_1.c: float32x2_t __attribute__((noinline,

Re: [pushed] analyzer: fix ICE in text art strings support

2023-08-31 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 30 Aug 2023 at 19:20, David Malcolm wrote: > > On Wed, 2023-08-30 at 11:52 +0530, Prathamesh Kulkarni wrote: > > On Wed, 30 Aug 2023 at 04:21, David Malcolm > > wrote: > > > > > > On Tue, 2023-08-29 at 11:01 +0530, Prathamesh Kulkarni wrote: > &g

Re: [pushed] analyzer: fix ICE in text art strings support

2023-08-30 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 30 Aug 2023 at 04:21, David Malcolm wrote: > > On Tue, 2023-08-29 at 11:01 +0530, Prathamesh Kulkarni wrote: > > On Fri, 25 Aug 2023 at 18:15, David Malcolm via Gcc-patches > > wrote: > > > > > > Successfully bootstrapped & regrtested on x86_64-pc

Re: [AArch64][testsuite] Adjust vect_copy_lane_1.c for new code-gen

2023-09-18 Thread Prathamesh Kulkarni via Gcc-patches
On Sun, 17 Sept 2023 at 20:11, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > After 27de9aa152141e7f3ee66372647d0f2cd94c4b90, there's a following > > regression: > > FAIL: gcc.target/aarch64/vect_copy_lane_1.c scan-assembler-times > &

Re: [PATCH][RFC] tree-optimization/92335 - Improve sinking heuristics for vectorization

2023-08-17 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 15 Aug 2023 at 14:28, Richard Sandiford wrote: > > Richard Biener writes: > > On Mon, 14 Aug 2023, Prathamesh Kulkarni wrote: > >> On Mon, 7 Aug 2023 at 13:19, Richard Biener > >> wrote: > >> > It doesn't seem to make a difference for x86

Re: [PATCH] tree-optimization/111048 - avoid flawed logic in fold_vec_perm

2023-08-21 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 21 Aug 2023 at 12:26, Richard Biener wrote: > > On Sat, 19 Aug 2023, Prathamesh Kulkarni wrote: > > > On Fri, 18 Aug 2023 at 14:52, Richard Biener wrote: > > > > > > On Fri, 18 Aug 2023, Richard Sandiford wrote: > > > > > > > Richard

Re: [PATCH][RFC] tree-optimization/92335 - Improve sinking heuristics for vectorization

2023-08-21 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 21 Aug 2023 at 12:27, Richard Biener wrote: > > On Sat, 19 Aug 2023, Prathamesh Kulkarni wrote: > > > On Fri, 18 Aug 2023 at 17:11, Richard Biener wrote: > > > > > > On Fri, 18 Aug 2023, Richard Biener wrote: > > > > > &g

Re: [PATCH] RISC-V: Support simplify (-1-x) for vector.

2023-08-21 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 16 Aug 2023 at 14:12, yanzhang.wang--- via Gcc-patches wrote: > > From: Yanzhang Wang > > The pattern is enabled for scalar but not for vector. The patch try to > make it consistent and will convert below code, (CCing Richard S.) Hi, Sorry if this comment is not relevant to the patch but

Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors

2023-08-16 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 15 Aug 2023 at 16:59, Prathamesh Kulkarni wrote: > > On Mon, 14 Aug 2023 at 18:23, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > On Thu, 10 Aug 2023 at 21:27, Richard Sandiford > > > wrote: > > >> > &

Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors

2023-08-16 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 16 Aug 2023 at 15:21, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > >> Unfortunately, the patch regressed following tests on ppc64le and > >> armhf respectively: > >> gcc.target/powerpc/vec-perm-ctor.c scan-tree-dump-not optimized > >

Re: [PATCH] tree-optimization/111048 - avoid flawed logic in fold_vec_perm

2023-08-19 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 18 Aug 2023 at 14:52, Richard Biener wrote: > > On Fri, 18 Aug 2023, Richard Sandiford wrote: > > > Richard Biener writes: > > > The following avoids running into somehow flawed logic in fold_vec_perm > > > for non-VLA vectors. > > > > > > Bootstrap & regtest running on

Re: [PATCH][RFC] tree-optimization/92335 - Improve sinking heuristics for vectorization

2023-08-19 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 18 Aug 2023 at 17:11, Richard Biener wrote: > > On Fri, 18 Aug 2023, Richard Biener wrote: > > > On Thu, 17 Aug 2023, Prathamesh Kulkarni wrote: > > > > > On Tue, 15 Aug 2023 at 14:28, Richard Sandiford > > > wrote: > > > > > >

Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors

2023-08-15 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 14 Aug 2023 at 18:23, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Thu, 10 Aug 2023 at 21:27, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> >> static bool > >> >> is_simple_vl

Re: [pushed] analyzer: fix ICE in text art strings support

2023-08-28 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 25 Aug 2023 at 18:15, David Malcolm via Gcc-patches wrote: > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > Pushed to trunk as r14-3481-g99a3fcb8ff0bf2. Hi David, It seems the new tests FAIL on arm for LTO bootstrap config:

Re: [PATCH 5/9] arm: [MVE intrinsics] add support for p8 and p16 polynomial types

2023-08-29 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 15 Aug 2023 at 00:05, Christophe Lyon via Gcc-patches wrote: > > Although they look like aliases for u8 and u16, we need to define them > so that we can handle p8 and p16 suffixes with the general framework. > > They will be used by vmull[bt]q_poly intrinsics. Hi Christophe, It seems your

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: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-25 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 25 May 2022 at 18:27, Richard Biener wrote: > > On Tue, May 24, 2022 at 9:22 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > On Tue, 24 May 2022 at 14:50, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni writes: > >

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

2022-05-25 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 26 May 2022 at 00:37, Richard Biener wrote: > > > > > Am 25.05.2022 um 21:03 schrieb Prathamesh Kulkarni > > : > > > > On Wed, 25 May 2022 at 18:27, Richard Biener > > wrote: > >> > >>> On Tue, May 24, 2022

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

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 >

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-24 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 24 May 2022 at 14:50, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi > > index c5006afc00d..0a3c733ada9 100644 > > --- a/gcc/doc/tm.texi > > +++ b/gcc/doc/tm.texi > > @@ -6088,14 +6088,18 @@

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: [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: vec_perm_const hook -- Fix build failure in ARM backend

2022-05-30 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 30 May 2022 at 13:04, Christophe Lyon wrote: > > Hi Prathamesh, > > > On 5/27/22 09:11, Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > > I forgot to adjust prototype for arm_vectorize_vec_perm_const, which, > > resulted in following > >

vec_perm_const hook -- Fix build failure in ARM backend

2022-05-27 Thread Prathamesh Kulkarni via Gcc-patches
Hi, I forgot to adjust prototype for arm_vectorize_vec_perm_const, which, resulted in following build error: # 00:05:33 make[3]: [Makefile:1787: armv8l-unknown-linux-gnueabihf/bits/largefile-config.h] Error 1 (ignored) # 00:10:53

[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

[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

[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

[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

[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

[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

[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

[statistics.cc] ICE in get_function_name with fortran test-case

2022-07-07 Thread Prathamesh Kulkarni via Gcc-patches
Hi, My recent commit to emit asm name with -fdump-statistics-asmname caused following ICE for attached fortran test case. during IPA pass: icf power.fppized.f90:6:26: 6 | END SUBROUTINE power_print | ^ internal compiler error: Segmentation fault 0xfddc13

Re: Floating-point allocation sizes? (was Re: [PATCH] analyzer: Fix handling of non-ints inside allocation size checker [PR106181])

2022-07-05 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 6 Jul 2022 at 03:08, David Malcolm via Gcc-patches wrote: > > On Tue, 2022-07-05 at 21:49 +0200, Tim Lange wrote: > > This patch fixes the ICE reported in PR106181 by Arseny Solokha. With > > this patch, the allocation size checker tries to handle floating-point > > operands of allocation

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: > &g

ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-07-12 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, For the following test: svint32_t f2(int a, int b, int c, int d) { int32x4_t v = (int32x4_t) {a, b, c, d}; return svld1rq_s32 (svptrue_b8 (), [0]); } The compiler emits following ICE with -O3 -mcpu=generic+sve: foo.c: In function ‘f2’: foo.c:4:11: error: non-trivial conversion in

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

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: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-07-20 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Jul 2022 at 11:57, Richard Biener wrote: > > On Fri, Jul 15, 2022 at 3:49 PM Prathamesh Kulkarni > wrote: > > > > On Thu, 14 Jul 2022 at 17:22, Richard Sandiford > > wrote: > > > > > > Richard Biener writes: > > > > On Thu, J

Re: [PATCH] Adding three new function attributes for static analysis of file descriptors

2022-07-20 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 20 Jul 2022 at 23:31, Immad Mir via Gcc-patches wrote: > > This patch adds three new function attributes to GCC that > are used for static analysis of usage of file descriptors: > > 1) __attribute__ ((fd_arg(N))): The attributes may be applied to a function > that > takes on open file

[aarch64] Use op_mode instead of vmode for op0, op1 in aarch64_vectorize_vec_perm_const

2022-07-14 Thread Prathamesh Kulkarni via Gcc-patches
Hi, For following test case: svint32_t foo() { int32x4_t v = (int32x4_t) { 1, 2, 3, 4 }; svint32_t v2 = svld1rq_s32 (svptrue_b8(), [0]); return v2; } After applying workaround in forwprop to not simplify VEC_PERM_EXPR in simplify_permutation to avoid type error in middle end (or using

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-07-15 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 14 Jul 2022 at 17:22, Richard Sandiford wrote: > > Richard Biener writes: > > On Thu, Jul 14, 2022 at 9:55 AM Prathamesh Kulkarni > > wrote: > >> > >> On Wed, 13 Jul 2022 at 12:22, Richard Biener > >> wrote: > >> > > >

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-07-14 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 13 Jul 2022 at 12:22, Richard Biener wrote: > > On Tue, Jul 12, 2022 at 9:12 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi Richard, > > For the following test: > > > > svint32_t f2(int a, int b, int c, int d) > > { > > i

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

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-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 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-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: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-08-29 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 18 Aug 2022 at 18:20, Prathamesh Kulkarni wrote: > > On Thu, 18 Aug 2022 at 18:14, Prathamesh Kulkarni > wrote: > > > > On Wed, 17 Aug 2022 at 17:01, Richard Biener > > wrote: > > > > > > On Tue, Aug 16, 2022 at 6:30 PM Richard Sandi

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-08-29 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 17 Aug 2022 at 18:09, Prathamesh Kulkarni wrote: > > Hi, > The attached prototype patch extends fold_vec_perm to fold VEC_PERM_EXPR > in VLA manner, and currently handles the following cases: > (a) fixed len arg0, arg1 and fixed len sel. > (b) fixed len arg0, arg1 and

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-08-18 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 18 Aug 2022 at 18:14, Prathamesh Kulkarni wrote: > > On Wed, 17 Aug 2022 at 17:01, Richard Biener > wrote: > > > > On Tue, Aug 16, 2022 at 6:30 PM Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni writes: > > > > On

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-08-18 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 17 Aug 2022 at 17:01, Richard Biener wrote: > > On Tue, Aug 16, 2022 at 6:30 PM Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > On Tue, 9 Aug 2022 at 18:42, Richard Biener > > > wrote: > > >> > > >> On

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-26 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 23 Sept 2022 at 21:33, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 20 Sept 2022 at 18:09, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Mon, 12 Sept 2022 at 19:57, Richard San

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-10-17 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 10 Oct 2022 at 16:18, Prathamesh Kulkarni wrote: > > On Fri, 30 Sept 2022 at 21:38, Richard Sandiford > wrote: > > > > Richard Sandiford via Gcc-patches writes: > > > Prathamesh Kulkarni writes: > > >> Sorry to ask a silly question but in whi

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-10-28 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 26 Oct 2022 at 21:07, Richard Sandiford wrote: > > Sorry for the slow response. I wanted to find some time to think > about this a bit more. > > Prathamesh Kulkarni writes: > > On Fri, 30 Sept 2022 at 21:38, Richard Sandiford > > wrote: > >> &g

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-10-24 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 17 Oct 2022 at 16:02, Prathamesh Kulkarni wrote: > > On Mon, 10 Oct 2022 at 16:18, Prathamesh Kulkarni > wrote: > > > > On Fri, 30 Sept 2022 at 21:38, Richard Sandiford > > wrote: > > > > > > Richard Sandiford via Gcc-patches writes: > &

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-15 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 12 Sept 2022 at 19:57, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Mon, 5 Sept 2022 at 15:51, Richard Sandiford > > wrote: > >> > >> Sorry for the slow reply. I wrote a response a couple of weeks ago > >>

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-09 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 5 Sept 2022 at 15:51, Richard Sandiford wrote: > > Sorry for the slow reply. I wrote a response a couple of weeks ago > but I think it get lost in a machine outage. > > Prathamesh Kulkarni writes: > > Hi, > > The attached prototype patch extends fold_vec

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-23 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 20 Sept 2022 at 18:09, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Mon, 12 Sept 2022 at 19:57, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> >> The VLA encoding encodes the

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-10-10 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 30 Sept 2022 at 21:38, Richard Sandiford wrote: > > Richard Sandiford via Gcc-patches writes: > > Prathamesh Kulkarni writes: > >> Sorry to ask a silly question but in which case shall we select 2nd vector > >> ? > >> For num_poly_int_coeffs ==

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-30 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 27 Sept 2022 at 01:59, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Fri, 23 Sept 2022 at 21:33, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Tue, 20 Sept 2022 at 18:09, Richard San

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-09-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 29 Aug 2022 at 11:53, Prathamesh Kulkarni wrote: > > On Thu, 18 Aug 2022 at 18:20, Prathamesh Kulkarni > wrote: > > > > On Thu, 18 Aug 2022 at 18:14, Prathamesh Kulkarni > > wrote: > > > > > > On Wed, 17 Aug 2022 at 17:01, Richard Biener

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-09-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 5 Sept 2022 at 14:39, Richard Biener wrote: > > On Mon, Sep 5, 2022 at 10:54 AM Prathamesh Kulkarni > wrote: > > > > On Mon, 29 Aug 2022 at 11:53, Prathamesh Kulkarni > > wrote: > > > > > > On Thu, 18 Aug 2022 at 18:20, Prathamesh Kulkarni

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-05 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 29 Aug 2022 at 11:38, Prathamesh Kulkarni wrote: > > On Wed, 17 Aug 2022 at 18:09, Prathamesh Kulkarni > wrote: > > > > Hi, > > The attached prototype patch extends fold_vec_perm to fold VEC_PERM_EXPR > > in VLA manner, and currently handles the follow

Re: [PATCH] match.pd: Add bitwise and pattern [PR106243]

2022-08-03 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 4 Aug 2022 at 00:41, Sam Feifer via Gcc-patches wrote: > > This patch adds a new optimization to match.pd. The pattern, -x & 1, > now gets simplified to x & 1, reducing the number of instructions > produced. Hi Sam, No comments on patch, but wondering if we can similarly add another

Missed lowering to ld1rq from svld1rq for memory operand

2022-08-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, Following from off-list discussion, in the attached patch, I wrote pattern similar to vec_duplicate_reg, which seems to work for the svld1rq tests. Does it look OK ? Sorry, I didn't fully understand your suggestion on integrating with vec_duplicate_reg pattern. For vec_duplicate_reg,

Re: [PATCH 3/4] match.pd: Teach forwprop to handle VLA VEC_PERM_EXPRs with VLS CONSTRUCTORs as arguments

2022-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 5 Aug 2022 at 18:26, Andre Vieira (lists) wrote: > > Hi, > > This patch is part of the WIP patch that follows in this series. It's > goal is to teach forwprop to handle VLA VEC_PERM_EXPRs with VLS > CONSTRUCTORs as arguments as preparation for the 'VLA constructor' hook > approach.

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-08-11 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 9 Aug 2022 at 18:42, Richard Biener wrote: > > On Tue, Aug 9, 2022 at 12:10 PM Prathamesh Kulkarni > wrote: > > > > On Mon, 8 Aug 2022 at 14:27, Richard Biener > > wrote: > > > > > > On Mon, Aug 1, 2022 at 5:17 AM Prathamesh Kulkarni >

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-08-09 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 8 Aug 2022 at 14:27, Richard Biener wrote: > > On Mon, Aug 1, 2022 at 5:17 AM Prathamesh Kulkarni > wrote: > > > > On Thu, 21 Jul 2022 at 12:21, Richard Biener > > wrote: > > > > > > On Wed, Jul 20, 2022 at 5:36 PM Prathamesh Kulkarni >

Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-08-17 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached prototype patch extends fold_vec_perm to fold VEC_PERM_EXPR in VLA manner, and currently handles the following cases: (a) fixed len arg0, arg1 and fixed len sel. (b) fixed len arg0, arg1 and vla sel (c) vla arg0, arg1 and vla sel with arg0, arg1 being VECTOR_CST. It seems to work

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-07-31 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 21 Jul 2022 at 12:21, Richard Biener wrote: > > On Wed, Jul 20, 2022 at 5:36 PM Prathamesh Kulkarni > wrote: > > > > On Mon, 18 Jul 2022 at 11:57, Richard Biener > > wrote: > > > > > > On Fri, Jul 15, 2022 at 3:49 PM Prathamesh Kulkarni >

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-12-25 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 13 Dec 2022 at 11:35, Prathamesh Kulkarni wrote: > > On Tue, 6 Dec 2022 at 21:00, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni via Gcc-patches writes: > > > On Fri, 4 Nov 2022 at 14:00, Prathamesh Kulkarni > > > wrote: > > &g

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

2022-12-25 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 6 Dec 2022 at 07:01, Prathamesh Kulkarni wrote: > > On Mon, 5 Dec 2022 at 16:50, Richard Sandiford > wrote: > > > > Richard Sandiford via Gcc-patches writes: > > > Prathamesh Kulkarni writes: > > >> Hi, > > >> For the following tes

Re: [Bug c/108224] [PATCH] add srandom random initstate setstate

2022-12-26 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 26 Dec 2022 at 14:25, Jonny Grant wrote: > > > > From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00:00 2001 > From: Jonathan Grant > Date: Sun, 25 Dec 2022 22:38:44 + > Subject: [PATCH] add srandom random initstate setstate > > --- > gcc/c-family/known-headers.cc | 4

Re: [Bug c/108224] [PATCH] add srandom random initstate setstate

2022-12-31 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 28 Dec 2022 at 04:01, Jonny Grant wrote: > > > > On 26/12/2022 09:19, Prathamesh Kulkarni wrote: > > On Mon, 26 Dec 2022 at 14:25, Jonny Grant wrote: > >> > >> > >> > >> From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00

Re: Missed lowering to ld1rq from svld1rq for memory operand

2023-01-10 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 5 Aug 2022 at 17:49, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi Richard, > > Following from off-list discussion, in the attached patch, I wrote pattern > > similar to vec_duplicate_reg, which seems to work for the svld1rq > &

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

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

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-12-12 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 6 Dec 2022 at 21:00, Richard Sandiford wrote: > > Prathamesh Kulkarni via Gcc-patches writes: > > On Fri, 4 Nov 2022 at 14:00, Prathamesh Kulkarni > > wrote: > >> > >> On Mon, 31 Oct 2022 at 15:27, Richard Sandiford > >> 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: > > >> > > &g

[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

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

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] 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 (), [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

Re: Missed lowering to ld1rq from svld1rq for memory operand

2023-01-14 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 12 Jan 2023 at 21:02, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Fri, 5 Aug 2022 at 17:49, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > Hi Richard, > >> > Follow

[aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-17 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, For the following (contrived) test: void foo(int32x4_t v) { v[3] = 0; return v; } -O2 code-gen: foo: fmovs1, wzr ins v0.s[3], v1.s[0] ret I suppose we can instead emit the following code-gen ? foo: ins v0.s[3], wzr ret combine produces:

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2023-01-17 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 26 Dec 2022 at 09:56, Prathamesh Kulkarni wrote: > > On Tue, 13 Dec 2022 at 11:35, Prathamesh Kulkarni > wrote: > > > > On Tue, 6 Dec 2022 at 21:00, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni via Gcc-patches writes: &g

Re: [aarch64] Use exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns.

2023-01-18 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 18 Jan 2023 at 20:00, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi Richard, > > Based on your suggestion in the other thread, the patch uses > > exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns. > > Bootstrap+test

Re: [aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-19 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 18 Jan 2023 at 19:59, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 17 Jan 2023 at 18:29, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > Hi Richard, > >> > For the fo

<    4   5   6   7   8   9   10   >