Re: [PATCH] vect: Fix shift-by-induction for single-lane slp

2024-06-27 Thread Richard Biener
> +} > diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc > index ca6052662a3..840e162c7f0 100644 > --- a/gcc/tree-vect-stmts.cc > +++ b/gcc/tree-vect-stmts.cc > @@ -6247,7 +6247,7 @@ vectorizable_shift (vec_info *vinfo, >if ((dt[1] == vect_internal_def > || dt[1] == vect_induction_def >

Re: [PATCH] vect: Fix shift-by-induction for single-lane slp

2024-06-27 Thread Feng Xue OS
LP_TREE_LANES (slp_node) == 1)) scalar_shift_arg = false; else if (dt[1] == vect_constant_def || dt[1] == vect_external_def -- 2.17.1 From: Richard Biener Sent: Thursday, June 27, 2024 12:49 AM To: Feng Xue OS Cc: gcc-patches@gcc.gnu.org S

Re: [PATCH] vect: Fix shift-by-induction for single-lane slp

2024-06-26 Thread Richard Biener
On Wed, Jun 26, 2024 at 4:58 PM Feng Xue OS wrote: > > Allow shift-by-induction for slp node, when it is single lane, which is > aligned with the original loop-based handling. OK. Did you try whether we handle multiple lanes correctly? The simplest case would be a loop body with say a[2*i] =

[PATCH] vect: Fix shift-by-induction for single-lane slp

2024-06-26 Thread Feng Xue OS
Allow shift-by-induction for slp node, when it is single lane, which is aligned with the original loop-based handling. Thanks, Feng --- gcc/tree-vect-stmts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index ca6052662a3..8

[PATCH] vect: Fix shift-by-induction for single-lane slp

2024-06-26 Thread Feng Xue OS
Allow shift-by-induction for slp node, when it is single lane, which is aligned with the original loop-based handling. Thanks, Feng --- gcc/tree-vect-stmts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index ca6052662a3..8