disable auto-vectorisation

Oleg Endo oleg.endo@t-online.de
Tue Dec 9 22:20:00 GMT 2014


On Tue, 2014-12-09 at 04:37 +0100, Gero Peterhoff wrote:
> Am 09.12.2014 um 02:57 schrieb David Wohlferd:
> > How about something like this:
> >
> > http://stackoverflow.com/a/13825238/2189500
> >
> > dw
> >
> > On 12/8/2014 5:22 PM, Gero Peterhoff wrote:
> >> Hello,
> >> How do I turn off auto-vectorisation for a given loop in a template?
> >> The template function / method must be inline.
> >>
> >> Thanks for the help
> >>
> >
> > .
> >
> Hello dw,
> That's my problem - it just does not work. The __attribute __ ((optimize ("no-tree-vectorize")))
> works ONLY for NON-inline functions / methods. With inline functions / methods, it is ignored by
> the compiler - there this attribute must be set already in the surrounding context. However, I am
> working on a generic library. Since I can not require that the user sets various compiler-specific
> attributes this to work them properly.

This is a known issue and there's a PR for it:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61882

Cheers,
Oleg



More information about the Gcc-help mailing list