> -----Original Message-----
> From: Richard Sandiford <richard.sandif...@arm.com>
> Sent: Thursday, February 13, 2025 4:55 PM
> To: Tamar Christina <tamar.christ...@arm.com>
> Cc: Richard Biener <rguent...@suse.de>; gcc-patches@gcc.gnu.org; nd
> <n...@arm.com>
> Subject: Re: [PATCH v2]middle-end: delay checking for alignment to load
> [PR118464]
>
> Tamar Christina <tamar.christ...@arm.com> writes:
> >> -----Original Message-----
> >> That said, I'm quite sure we don't want to have a dr->target_alignment
> >> that isn't power-of-two, so if the comput doesn't end up with a
> >> power-of-two value we should leave it as the target prefers and
> >> fixup (or fail) during vectorizable_load.
> >
> > Ack I'll round up to power of 2.
>
> I don't think that's enough. Rounding up 3 would give 4, but a group
> size of 3 would produce vector iterations that start at 0, 3X, 6X, 9X, 12X
> for some X. [3X, 6X) and [6X, 9X) both straddle a 4X alignment boundary.
>
Indeed, instead of rounding up I just reject the non-power of 2 alignment
requests in vectorizable_load as Richi originally requested. I thought I could
get it to work better by rounding up but it doesn't seem worth it.
Cheers,
Tamar
> Thanks,
> Richard