------- Comment #9 from dominiq at lps dot ens dot fr  2007-11-30 15:23 -------
> I think we should turn on cost model by default, at least for i386.

Although the information on cost model are very scarce in the gcc manual, if
its goal is to avoid too costly vectorization, it should certainly turned on by
default.  And probably if this increases the execution time, the cost model
would need some tuning.  Concerning the induct code it is not a good test case
on PPC since it uses double FP.  On a 2.16Ghz Core2Duo I get for induct:

-O3 -ffast-math -funroll-loops induct.f90
        93.192u 0.066s 1:33.28 99.9%    0+0k 0+1io 0pf+0w
-O3 -ffast-math -funroll-loops -fvect-cost-model induct.f90
        73.453u 0.107s 1:13.57 99.9%    0+0k 0+1io 0pf+0w
-O3 -ffast-math -funroll-loops -mfpmath=387 induct.f90
        105.564u 0.128s 1:45.69 99.9%   0+0k 0+1io 0pf+0w
-O3 -ffast-math -funroll-loops -mfpmath=387 -fvect-cost-model induct.f90
        79.162u 0.088s 1:19.25 99.9%    0+0k 0+0io 0pf+0w


With the patch in comment #5 of PR34265, the timings are:
without -mfpmath=387  and with or without -fvect-cost-model
        37.014u 0.065s 0:37.08 99.9%    0+0k 0+0io 0pf+0w
with -mfpmath=387  and with or without -fvect-cost-model
        39.820u 0.071s 0:39.89 100.0%   0+0k 0+0io 0pf+0w


-- 


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

Reply via email to