On Wed, Oct 16, 2013 at 12:22 PM, Kyrill Tkachov <kyrylo.tkac...@arm.com> wrote: > On 16/10/13 10:37, pins...@gmail.com wrote: >>> >>> On Oct 15, 2013, at 6:58 AM, Igor Zamyatin <izamya...@gmail.com> wrote: >>> Hi All! >>> >>> Is there any particular reason that matmul* modules from libgfortran >>> are compiled with -O2 -ftree-vectorize? >>> >>> I see some regressions on Atom processor after r202980 >>> (http://gcc.gnu.org/ml/gcc-cvs/2013-09/msg00846.html) >>> >>> Why not just use O3 for those modules? >> >> -O3 and -O2 -ftree-vectorize won't give much performance difference. What >> you are seeing is the cost model needs improvement; at least for atom. > > Hi all, > I think http://gcc.gnu.org/ml/gcc-patches/2013-09/msg01908.html introduced > the new "cheap" vectoriser cost model that favors compilation time over > runtime performance and is set as default for -O2. -O3 uses the "dynamic" > model which potentially gives better runtime performance in exchange for > longer compile times (if I understand the new rules correctly). > Therefore, I'd expect -O3 to give a better vector performance than -O2...
But this suggests to compile with -O2 -ftree-vectorize -fvect-cost-model=dynamic, not building with -O3. Richard. > Kyrill > >