RE: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-26 Thread Richard Biener
On Mon, 19 May 2025, Tamar Christina wrote: > > >/* Complete the target-specific cost calculations. */ > > >loop_vinfo->vector_costs->finish_cost (loop_vinfo->scalar_costs); > > >vec_prologue_cost = loop_vinfo->vector_costs->prologue_cost (); > > > @@ -12373,6 +12394,13 @@ vect_transf

RE: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-19 Thread Tamar Christina
> >/* Complete the target-specific cost calculations. */ > >loop_vinfo->vector_costs->finish_cost (loop_vinfo->scalar_costs); > >vec_prologue_cost = loop_vinfo->vector_costs->prologue_cost (); > > @@ -12373,6 +12394,13 @@ vect_transform_loop (loop_vec_info loop_vinfo, > gimple *loop_ve

RE: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-15 Thread Richard Biener
On Wed, 14 May 2025, Tamar Christina wrote: > > > > > > > > > > - /* Loops vectorized with a variable factor won't benefit from > > > > > + /* Loops vectorized would have already taken into account unrolling > > specified > > > > > + by the user as the suggested unroll factor, as such we nee

RE: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-14 Thread Tamar Christina
> > > > > > > > - /* Loops vectorized with a variable factor won't benefit from > > > > + /* Loops vectorized would have already taken into account unrolling > specified > > > > + by the user as the suggested unroll factor, as such we need to > > > > prevent the > > > > + RTL unroller fr

RE: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-13 Thread Richard Biener
On Tue, 13 May 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, May 13, 2025 1:59 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd > > Subject: Re: [PATCH 1/2]middle-end: Apply loop

RE: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-13 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, May 13, 2025 1:59 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd > Subject: Re: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer > > On Tue, 13 May 2025, Tamar Chr

Re: [PATCH 1/2]middle-end: Apply loop->unroll directly in vectorizer

2025-05-13 Thread Richard Biener
On Tue, 13 May 2025, Tamar Christina wrote: > Hi All, > > Consider the loop > > void f1 (int *restrict a, int n) > { > #pragma GCC unroll 4 requested > for (int i = 0; i < n; i++) > a[i] *= 2; > } > > Which today is vectorized and then unrolled 3x by the RTL unroller due to the > use of t