https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98542
--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to rguent...@suse.de from comment #3) > On Wed, 6 Jan 2021, rsandifo at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98542 > > > > --- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot > > gnu.org> --- > > With the follow-on mentioned (āiā being 32-bits rather than 64) we'd > > still want to treat the structure access as a single group, even though > > the fields are different sizes. > > Supporting that is going to be tricky though. Presumably this only > works for { int, double }, not for { int, int, double } and accessing > the 2nd int (or it all depends on endianess?). It should work for both in the SVE example. The idea is that the int field will be loaded into an unpacked vector, with each 32-bit element being stored in a 64-bit container. We then need to extend the int (if the int starts off in the low half) or right-shift the container (if the int starts off in the high half). The nice thing about the gather example is that the extend case can be folded into the gather itself. Like you say, the choice between extending and shifting will depend on which int we need and on the endianness. All four combinations should be doable though.