On Fri, 27 Jun 2025, Robin Dapp wrote:
> > Maybe we can pass a scalar mode to the hook when we ask for
> > SCATTER/GATHER? That might need fixups in other targets of course,
> > but it would make it clear what we're asking for?
>
> How about an additional argument bool gather_scatter to make it
Maybe we can pass a scalar mode to the hook when we ask for
SCATTER/GATHER? That might need fixups in other targets of course,
but it would make it clear what we're asking for?
How about an additional argument bool gather_scatter to make it more explicit?
Then we could just
if (gather_scatt
On Thu, 26 Jun 2025, Robin Dapp wrote:
> > + bool is_misaligned = scalar_align < inner_vectype_sz;
> > + bool is_packed = scalar_align > 1 && is_misaligned;
> > +
> > + *misalignment = !is_misaligned ? 0 : inner_vectype_sz - scalar_align;
> > +
> > + if (targetm.vectorize.suppo
+ bool is_misaligned = scalar_align < inner_vectype_sz;
+ bool is_packed = scalar_align > 1 && is_misaligned;
+
+ *misalignment = !is_misaligned ? 0 : inner_vectype_sz -
scalar_align;
+
+ if (targetm.vectorize.support_vector_misalignment
+ (TYPE_MODE (vectype), inner_
On Wed, 25 Jun 2025, Richard Biener wrote:
> On Wed, 25 Jun 2025, Robin Dapp wrote:
>
> > Hi,
> >
> > this patch adds simple misalignment checks for gather/scatter
> > operations. Previously, we assumed that those perform element accesses
> > internally so alignment does not matter. The riscv
This change reminds me that we lack documentation about arguments
of most of the "complicated" internal functions ...
I didn't mention it but I got implicitly reminded several times while writing
the patch... ;) An overhaul has been on my todo list for a while but of course
it never was top pr
On Wed, 25 Jun 2025, Robin Dapp wrote:
> Hi,
>
> this patch adds simple misalignment checks for gather/scatter
> operations. Previously, we assumed that those perform element accesses
> internally so alignment does not matter. The riscv vector spec however
> explicitly states that vector operat
Hi,
this patch adds simple misalignment checks for gather/scatter
operations. Previously, we assumed that those perform element accesses
internally so alignment does not matter. The riscv vector spec however
explicitly states that vector operations are allowed to fault on
element-misaligned acc