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
u.org; ktkac...@nvidia.com > > Subject: RE: [PATCH] vect: Improve vectorization for small-trip-count loops > > using > > subvectors > > > > On Wed, 4 Jun 2025, Tamar Christina wrote: > > > > > > -Original Message- > > > > From:

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
u.org; ktkac...@nvidia.com > > Subject: RE: [PATCH] vect: Improve vectorization for small-trip-count loops > > using > > subvectors > > > > On Tue, 3 Jun 2025, Tamar Christina wrote: > > > > > > -Original Message- > > > > Fro

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
u.org; ktkac...@nvidia.com > > Subject: Re: [PATCH] vect: Improve vectorization for small-trip-count loops > > using > > subvectors > > > > On Fri, May 9, 2025 at 4:05 PM Tamar Christina > > wrote: > > > > > > > -Original Message-

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: [PING] [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-06-02 Thread Jeff Law
On 6/2/25 2:23 AM, Pengfei Li wrote: Hi all, I would like to bring attention back to this patch: https://inbox.sourceware.org/gcc-patches/20250508164950.5646-1-pengfei@arm.com/ The patch improves auto-vectorization for loops with known small trip counts by introducing a new target ho

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

2025-06-02 Thread Pengfei Li
orization for small-trip-count loops using subvectors > -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] vec

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

2025-05-09 Thread Richard Biener
e: [PATCH] vect: Improve vectorization for small-trip-count loops > > using > > subvectors > > > > On Fri, 9 May 2025, Richard Sandiford wrote: > > > > > Richard Biener writes: > > > > On Thu, 8 May 2025, Pengfei Li wrote: > > > > > &

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

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

2025-05-08 Thread Pengfei Li
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 all vector elements to be processed in the loop.