[FFmpeg-devel] [RFC] Disable gcc auto-vectorisation

Måns Rullgård mans
Tue Jul 14 17:29:07 CEST 2009


Jason Garrett-Glaser <darkshikari at gmail.com> writes:

> 2009/7/13 M?ns Rullg?rd <mans at mansr.com>:
>> Since gcc 4.3, the auto-vectoriser (-ftree-vectorize) has been enabled
>> at -O3 optimisation level. ?This vectoriser is, mildly put, useless.
>> When it doesn't produce outright broken code, it is a gamble whether
>> the result is any faster whatsoever, and we have seen cases where it
>> introduced a significant slowdown.
>>
>> My proposal is to disable this misfeature by adding
>> -fno-tree-vectorize to the compiler flags when using gcc.
>>
>> Does anyone have a good reason for not doing this?
>
> The only reason I can imagine to not do this is that it makes GCC look
> less bad on default ffmpeg builds, giving us less to make fun of.

Uoti claimed on IRC he saw a slowdown when adding -fno-tree-vectorize
on x86.  I'd like some more details, and hard figures, on this.

Meanwhile, I suggest adding this flag for all non-x86 gcc builds.  I
have not seen any significant performance benefit, only random
fluctuations of 1% or less, when testing this on PPC and ARM/NEON.  I
don't know of any other architectures where gcc even attempts to
support SIMD instructions.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list