Re: [PATCH] vect: Use combined peeling and versioning for mutually aligned DRs

2025-06-10 Thread Pengfei Li
Hi Alex, > It might be nice to at least experiment with supporting DRs with > different steps as follow-on work. I agree that we should leave it out > for the first version to keep things simple. > FWIW, in case it's of interest, I wrote a script to calculate the > possible combinations of align

Re: [PATCH] vect: Use combined peeling and versioning for mutually aligned DRs

2025-06-10 Thread Alex Coplan
Hi Pengfei, This looks really good, I've just left a couple of small comments below. On 06/06/2025 14:35, Pengfei Li wrote: > Current GCC uses either peeling or versioning, but not in combination, > to handle unaligned data references (DRs) during vectorization. This > limitation causes some loop

Re: [PATCH] vect: Use combined peeling and versioning for mutually aligned DRs

2025-06-08 Thread Richard Biener
On Fri, 6 Jun 2025, Pengfei Li wrote: > Current GCC uses either peeling or versioning, but not in combination, > to handle unaligned data references (DRs) during vectorization. This > limitation causes some loops with early break to fall back to scalar > code at runtime. > > Consider the followin

[PATCH] vect: Use combined peeling and versioning for mutually aligned DRs

2025-06-06 Thread Pengfei Li
Current GCC uses either peeling or versioning, but not in combination, to handle unaligned data references (DRs) during vectorization. This limitation causes some loops with early break to fall back to scalar code at runtime. Consider the following loop with DRs in its early break condition: