Re: [PATCH 2/4] vect: Fix inaccurate vector stmts number for slp reduction with lane-reducing

2024-07-13 Thread Feng Xue OS
that ok? Or any other suggestion? > > I think that's kind-of in line with the suggestion of a reduction > specific VF, so yes, > not using SLP_TREE_NUMBER_OF_VEC_STMTS in vect_transform_reduction > sounds fine to me and would be a step towards not having > SLP_TREE_NUMBER_OF

Re: [PATCH 2/4] vect: Fix inaccurate vector stmts number for slp reduction with lane-reducing

2024-07-12 Thread Richard Biener
-of in line with the suggestion of a reduction specific VF, so yes, not using SLP_TREE_NUMBER_OF_VEC_STMTS in vect_transform_reduction sounds fine to me and would be a step towards not having SLP_TREE_NUMBER_OF_VEC_STMTS where the function would be responsible for appropriate allocation as well.

Re: [PATCH 2/4] vect: Fix inaccurate vector stmts number for slp reduction with lane-reducing

2024-07-11 Thread Feng Xue OS
YPE? As said having wrong > SLP_TREE_NUMBER_OF_VEC_STMTS is going to backfire. Then the alternative is to limit special handling related to the vec_num only inside vect_transform_reduction. Is that ok? Or any other suggestion? Thanks, Feng ________________________ From: Rich

Re: [PATCH 2/4] vect: Fix inaccurate vector stmts number for slp reduction with lane-reducing

2024-07-11 Thread Richard Biener
On Thu, Jul 11, 2024 at 10:53 AM Feng Xue OS wrote: > > Vector stmts number of an operation is calculated based on output vectype. > This is over-estimated for lane-reducing operation. Sometimes, to workaround > the issue, we have to rely on additional logic to deduce an exactly accurate > number

[PATCH 2/4] vect: Fix inaccurate vector stmts number for slp reduction with lane-reducing

2024-07-11 Thread Feng Xue OS
info, vectype, SLP_TREE_LANES (slp_node)); +} + /* Return the number of copies needed for loop vectorization when a statement operates on vectors of type VECTYPE. This is the vectorization factor divided by the number of elements in -- 2.17.1From ece7ade0be117f2a081d098f9ea6625cb21a51f7 Mon Sep 17