[Bug tree-optimization/113441] [14 Regression] Fail to fold the last element with multiple loop since g:2efe3a7de0107618397264017fb045f237764cc7
rsandifo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 29 22:18:22 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113441
--- Comment #31 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #29)
> This works fine for normal gather and scatters but doesn't work for widening
> gathers and narrowing scatters which only the pattern seems to handle.
I'm supposedly on holiday, so didn't see the IRC discussion, but: as I remember
it, there is no narrowing or widening for IFN gathers or scatters as such, even
for patterns. One vector's worth of offsets corresponds to one vector's worth
of data. But the widths of the data elements and the offset elements can be
different. Any sign or zero extension of a loaded vector, or any operation to
double or halve the number of vectors, is done separately.
I think it does make sense to stick to that, rather than (say) have IFNs that
load two offset vectors into one data vector, or use one offset vector to load
two data vectors. Supporting those combinations would mean that we have two
different ways in which the offset elements and data elements have different
widths. And it isn't really a natural fusion on SVE.
More information about the Gcc-bugs
mailing list