RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Wednesday, June 4, 2025 10:43 AM > To: Richard Sandiford > Cc: Tamar Christina ; Richard Biener > ; Pengfei Li ; gcc- > patc...@gcc.gnu.org; ktkac...@nvidia.com > Subject: Re: [PATCH] vect: Improve vectorizat

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
On Wed, 4 Jun 2025, Richard Sandiford wrote: > Sorry for responding late. > > Richard Biener writes: > >> > > > > > OK, so SVE VLS -msve-vector-bits=128 modes are indistinguishable > >> > > > > > from > >> > Adv. > >> > > > > > SIMD > >> > > > > > modes by the middle-end? > >> > > > > > >> > >

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Pengfei Li
Thank you for all suggestions above. > > I see. So this clearly is a feature on instructions then, not modes. > > In fact it might be profitable to use unpredicated add to avoid > > computing the loop mask for a specific element width completely even > > when that would require more operation for

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Sandiford
Sorry for responding late. Richard Biener writes: >> > > > > > OK, so SVE VLS -msve-vector-bits=128 modes are indistinguishable >> > > > > > from >> > Adv. >> > > > > > SIMD >> > > > > > modes by the middle-end? >> > > > > >> > > > > I believe so, the ACLE types have an annotation on them to lif

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
Richard Biener > > > > Sent: Wednesday, June 4, 2025 8:04 AM > > > > To: Tamar Christina > > > > Cc: Richard Biener ; Richard Sandiford > > > > ; Pengfei Li ; gcc- > > > > patc...@gcc.gnu.org; ktkac...@nvidia.com > > > &g

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Tamar Christina
gt; > Cc: Richard Biener ; Richard Sandiford > > > ; Pengfei Li ; gcc- > > > patc...@gcc.gnu.org; ktkac...@nvidia.com > > > Subject: RE: [PATCH] vect: Improve vectorization for small-trip-count > > > loops > using > > > subvectors > > > > > >

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
m: Richard Biener > > > > Sent: Tuesday, June 3, 2025 2:12 PM > > > > To: Tamar Christina > > > > Cc: Richard Biener ; Richard Sandiford > > > > ; Pengfei Li ; gcc- > > > > patc...@gcc.gnu.org; ktkac...@nvidia.com > > > > Su

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Tamar Christina
gt; > Cc: Richard Biener ; Richard Sandiford > > > ; Pengfei Li ; gcc- > > > patc...@gcc.gnu.org; ktkac...@nvidia.com > > > Subject: Re: [PATCH] vect: Improve vectorization for small-trip-count > > > loops > using > > > subvectors > > > &

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-04 Thread Richard Biener
> > > > From: Richard Biener > > > > Sent: Friday, May 9, 2025 2:44 PM > > > > To: Tamar Christina > > > > Cc: Richard Sandiford ; Pengfei Li > > > > ; gcc-patches@gcc.gnu.org; ktkac...@nvidia.com > > > >

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-03 Thread Tamar Christina
> > > Cc: Richard Sandiford ; Pengfei Li > > > ; gcc-patches@gcc.gnu.org; ktkac...@nvidia.com > > > Subject: RE: [PATCH] vect: Improve vectorization for small-trip-count > > > loops > using > > > subvectors > > > > > > On Fri, 9 May 2

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-03 Thread Richard Biener
; > > > Sent: Friday, May 9, 2025 11:08 AM > > > > To: Richard Sandiford > > > > Cc: Pengfei Li ; gcc-patches@gcc.gnu.org; > > > > ktkac...@nvidia.com > > > > Subject: Re: [PATCH] vect: Improve vectorization for small-trip-count > > &g

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 9, 2025 11:08 AM > > To: Richard Sandiford > > Cc: Pengfei Li ; gcc-patches@gcc.gnu.org; > > ktkac...@nvidia.com > > Subject: R

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Pengfei Li
Hi Richard Biener, As Richard Sandiford has already addressed your questions in another email, I just wanted to add a few below. > That said, we already have unmasked ABS in the IL: > > vect__1.6_15 = .MASK_LOAD (&a, 16B, { -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, > 0, 0, 0, 0, 0, 0, ... }, { 0, ...

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 9, 2025 2:44 PM > To: Tamar Christina > Cc: Richard Sandiford ; Pengfei Li > ; gcc-patches@gcc.gnu.org; ktkac...@nvidia.com > Subject: RE: [PATCH] vect: Improve vectorization for small-trip-count loops

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Sandiford
Tamar Christina writes: >> -Original Message- >> From: Richard Biener >> Sent: Friday, May 9, 2025 11:08 AM >> To: Richard Sandiford >> Cc: Pengfei Li ; gcc-patches@gcc.gnu.org; >> ktkac...@nvidia.com >> Subject: Re: [PATCH] vect: Improv

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 9, 2025 11:08 AM > To: Richard Sandiford > Cc: Pengfei Li ; gcc-patches@gcc.gnu.org; > ktkac...@nvidia.com > Subject: Re: [PATCH] vect: Improve vectorization for small-trip-count loops > using >

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Richard Sandiford wrote: > Richard Biener writes: > > On Thu, 8 May 2025, Pengfei Li wrote: > > > >> This patch improves the auto-vectorization for loops with known small > >> trip counts by enabling the use of subvectors - bit fields of original > >> wider vectors. A subvecto

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Sandiford
Richard Biener writes: > On Thu, 8 May 2025, Pengfei Li wrote: > >> This patch improves the auto-vectorization for loops with known small >> trip counts by enabling the use of subvectors - bit fields of original >> wider vectors. A subvector must have the same vector element type as the >> origina

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Biener
On Thu, 8 May 2025, Pengfei Li wrote: > This patch improves the auto-vectorization for loops with known small > trip counts by enabling the use of subvectors - bit fields of original > wider vectors. A subvector must have the same vector element type as the > original vector and enough bits for al