https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97428
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Michael_S from comment #9) > Hopefully, you did regression tests for all main AoS<->SoA cases. We only test what we have in the testsuite ;) > I.e. > > typedef struct { double re, im; } dcmlx_t; > void soa2aos(double* restrict dstRe, double* restrict dstIm, const dcmlx_t > src[], int nq) > { > for (int i = 0; i < nq*4; ++i) { > dcmlx_t s = src[i]; > dstRe[i] = s.re; > dstIm[i] = s.im; > } > } > > void aos2soa(dcmlx_t* restrict dst, const double* srcRe, const double* > srcIm, int nq) > { > for (int i = 0; i < nq*4; ++i) { > dst[i].re = srcRe[i]; > dst[i].im = srcIm[i]; > } > } > > And equivalents with float instead of double. > > Right now 'gcc.10.2 -march=skylake -O3' does very good job for soa2aos() and > suboptimal, but not horrible job for aos2soa(). Hopefully, your changes do > not break any of it. None of the above should be affected since neither involves SLP > Personally, I don't like SoA layouts and very much prefer AoSoA, but I > recognize that in existing code bases SoA is more common.