[Bug tree-optimization/58039] -ftree-vectorizer makes a loop crash on a non-aligned memory

mikpe at it dot uu.se gcc-bugzilla@gcc.gnu.org
Mon Aug 12 12:18:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58039

--- Comment #5 from Mikael Pettersson <mikpe at it dot uu.se> ---
(In reply to Alexander Barkov from comment #4)
> > The
> > vectorizer turns those into larger and still mis-aligned `movdqa' stores,
> > which x86 does not allow, hence the SEGV.
> 
> Can you please clarify: is it a bug in the recent gcc versions?
> 
> Note, we've used such performance improvement tricks for years.
> It worked perfectly fine until now.
> Has anything changed in how the gcc vectorizer works recently?

I know next to nothing about the vectorizer, so I cannot comment on this.

> Unfortunately it's not possible to avoid mis-aligned stores due to the
> project architecture.

Mis-aligned accesses are Ok, as long as they are expressed using the proper
mechanisms (memcpy, attribute packed, or pragma packed).

> I've read somewhere that gcc vectorizer generates two code branches,
> for aligned memory and for non-aligned memory (but can't find
> the reference now). Can you please confirm this?

I don't know, see above.



More information about the Gcc-bugs mailing list