https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127928

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The vectorizer only handles contiguous stores vector stores (it doesn't
use masking for gaps) and the VMAT_ELEMENTWISE fallback doesn't handle
masked stores (we'd have to emit mask extract and compare-and-branch
around the not masked scalar store).

For masked stores the best would be to handle the gaps via masks,
so we'd "spread out" the data vector, { v0, v1, .. } -> { v0, <gap>, v1, ... }
and also the mask vector.  For power-of-two gaps upacking can probably
efficiently do this.  For arbitrary gaps it's more questionable.  Possibly
emulating the masked scalar store with a masked vector store and a { -1, 0, ...
} mask would be possible but then the store overlaps will likely be very
awkward to handle in HW and possibly be very slow.

Reply via email to