On Fri, Sep 12, 2025 at 12:09 PM Robin Dapp <rdapp....@gmail.com> wrote: > > > I wonder in which cases we have misalignment == -1 but !is_packed? > > Isn't that just the new case of gather_scatter (without punning and when we > couldn't analyze the dataref)? The dataref might be naturally aligned but we > explicitly set misalignment to -1.
Ah, true. The idea of a "vector alignment" for the gather load is something that doesn't exist. We can of course re-interpret it as misalignment of the elements if it's a gather. > In that case I relied on !is_packed for riscv. I guess it's easiest to keep is_packed then, but is it having the data accesses aligned to element _size_ or to element mode alignment? For gather a target couldn't distinguish this based on is_packed, but when misalignment is the misalignment of the element in this case it could? > -- > Regards > Robin >