Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Hi, Richard. > Would you mind take a look at the loop control part again: > > static gcond * > vect_set_loop_condition_partial_vectors (class loop *loop, > loop_vec_info loop_vinfo, tree niters, > tree final_iv, bool niters_maybe_zero, > gimple_stmt_iterator

Re: Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread juzhe.zh...@rivai.ai
to implement VEC_PACK_TRUNC to test your idea. Thanks juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-04-26 17:06 To: juzhe.zhong\@rivai.ai CC: gcc-patches; rguenther Subject: Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support "juzhe.zh...@rivai.

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread Richard Sandiford via Gcc-patches
.. > .LEN_STORE (_13, 16B, X, vect__7.10_33); (INT16) > > Is this correct ? > > Thanks. > > > juzhe.zh...@rivai.ai > > From: Richard Sandiford > Date: 2023-04-26 16:06 > To: juzhe.zhong\@rivai.ai > CC: gcc-patches; rguenther > Subject: Re: [PATCH] VECT: Add de

Re: Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread juzhe.zh...@rivai.ai
t;controls.is_empty () && vect_maybe_permute_loop_masks (_seq, rgc, half_rgc)) continue; } Is that correct? juzhe.zh...@rivai.ai From: juzhe.zh...@rivai.ai Date: 2023-04-26 16:55 To: richard.sandiford CC: gcc-patches; rguenther Subject: Re: Re: [PATCH] VECT: Add decrement IV iteration loop

Re: Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread juzhe.zh...@rivai.ai
vect__7.10_33 = VEC_PACK_TRUNC_EXPR ; ... .LEN_STORE (_13, 16B, X, vect__7.10_33); (INT16) Is this correct ? Thanks. juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-04-26 16:06 To: juzhe.zhong\@rivai.ai CC: gcc-patches; rguenther Subject: Re: [PATCH] VECT: Add decrement IV iteration

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Thanks Richard so much. > >>> I don't think that's guaranteed by the proposed definition of WHILE_LEN. >>> The first int64_t WHILE_LEN could come up short, and return something >>> less than VF/2. > > I am so sorry that the comments of

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, 25 Apr 2023, Richard Sandiford wrote: >> juzhe.zh...@rivai.ai writes: >> > diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc >> > index a52277abdbf..54845a62298 100644 >> > --- a/gcc/tree-ssa-loop-manip.cc >> > +++ b/gcc/tree-ssa-loop-manip.cc

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-26 Thread Richard Biener via Gcc-patches
On Tue, 25 Apr 2023, Richard Sandiford wrote: > juzhe.zh...@rivai.ai writes: > > diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc > > index a52277abdbf..54845a62298 100644 > > --- a/gcc/tree-ssa-loop-manip.cc > > +++ b/gcc/tree-ssa-loop-manip.cc > > @@ -59,14 +59,14 @@ static

Re: Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread juzhe.zh...@rivai.ai
/2023-April/616730.html Feel free to comments. Thanks juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-04-26 00:58 To: juzhe.zhong CC: gcc-patches; rguenther Subject: Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support juzhe.zh...@rivai.ai writ

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On 25 April 2023 18:58:10 CEST, Richard Sandiford via Gcc-patches wrote: >juzhe.zh...@rivai.ai writes: >> diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc >> index 6e81dc05e0e..5f44def90d3 100644 >> diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc >> index

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread Richard Sandiford via Gcc-patches
juzhe.zh...@rivai.ai writes: > diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc > index 6e81dc05e0e..5f44def90d3 100644 > --- a/gcc/internal-fn.cc > +++ b/gcc/internal-fn.cc > @@ -127,6 +127,7 @@ init_internal_fns () > #define cond_binary_direct { 1, 1, true } > #define cond_ternary_direct {

[PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread juzhe . zhong
From: Juzhe-Zhong Hi, this is the most important patch for RVV auto-vectorization support. It supports WHILE_LEN pattern to not only decrement Loop control IV counter, but also adjust data reference address pointer by WHILE_LEN. 1. Single control loop (vec_num == 1 && ncopies == 1): int