This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/88487] union prevents autovectorization


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]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]