[Bug middle-end/88490] Missed autovectorization when indices are different
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Dec 17 08:06:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88490
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 14 Dec 2018, joseph at codesourcery dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88490
>
> --- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
> On Fri, 14 Dec 2018, rguenther at suse dot de wrote:
>
> > Note I do not think the C standard is sufficiently clear with regarding
> > to restrict qualified pointers loaded from memory.
>
> I think this is where "Every access that modifies X shall be considered
> also to modify P, for the purposes of this subclause." comes in. (See
> what I said at <https://gcc.gnu.org/ml/gcc-bugs/2005-01/msg03394.html>.)
> Modifying s->d[n][0] is considered to modify s->d[n], and so considered to
> modify s->d, and so considered to modify s. (It's still perfectly valid
> to have n == k; what's not valid is aliasing between objects accessed via
> s->d[0] and s->d[1], for example.)
OK, thanks for clarifying. I think we are fine implementation-wise
and I have a hard time thinking of a way to improve here given we
have to compute sth conservatively correct.
More information about the Gcc-bugs
mailing list