[Bug middle-end/88487] union prevents autovectorization
bugzilla@poradnik-webmastera.com
gcc-bugzilla@gcc.gnu.org
Thu Dec 13 17:11:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
--- Comment #1 from Daniel Fruzynski <bugzilla@poradnik-webmastera.com> ---
Update: when pointers to data are copied to local variables like below,
autovectorization starts working again.
[code]
void test3(S2* __restrict__ s1, S2* __restrict__ s2)
{
double* __restrict__ * __restrict__ d1 = s1->d;
double* __restrict__ * __restrict__ d2 = s2->d;
for (int n = 0; n < 2; ++n)
{
d1[n][0] = d2[n][0];
d1[n][1] = d2[n][1];
}
}
[/code]
More information about the Gcc-bugs
mailing list