[Bug c++/85057] GCC fails to vectorize code unless dummy loop is added
mokreutzer at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 27 11:53:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85057
--- Comment #5 from Moritz Kreutzer <mokreutzer at gmail dot com> ---
(In reply to Richard Biener from comment #4)
> The issue lies in dependence analysis which faces
>
> _21 = (sizetype) i_24;
> _22 = _21 * 8;
> _2 = &a + _22;
> _13 = MEM[(const Type_t &)&a][i_24].v[0];
> _14 = _13 * 5.0e-1;
> MEM[(double &)_2] = _14;
>
> marks the two refs for a runtime alias test and then when doing that
> figures they always alias (but doesn't handle the distance == 0 case
> specially).
But then I still don't understand how adding the dummy loop helps GCC in
determining the independence of loop iterations.
>
> This is a dup of another existing bug that dependence analysis doesn't
> cope very well with a mix of pointer vs. array accesses.
Are you talking about 65206? Seems like it's not an easy bug to fix? Anyways, I
hope it helps to have proof of another manifestation of this bug...
More information about the Gcc-bugs
mailing list