This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can I use -Ofast without libmvec


2018-03-22 19:08 GMT+01:00 Steve Ellcey <sellcey@cavium.com>:
> I have a question about the math vector library routines in libmvec.
> If I compile a program on x86 with -Ofast, something like:
>
> void foo(double * __restrict x, double * __restrict y, double * __restrict z)
> {
>         for (int i = 0; i < 1000; i++) x[i] = sin(y[i]);
> }
>
> I get a call to the vector sin routine _ZGVbN2v_sin.  That is fine, but
> is there some way to compile with -Ofast and not use the libmvec vector
> routines?  I have tried -fopenmp, -fopenmp-simd, -fno-openmp, and -fno-
> openmp-simd and I always get a call to _ZGVbN2v_sin.  Is there anyway
> to stop the use of the vectorized calls (without turning off -Ofast)?

It looks you have Glibc version >= 2.23 and GCC >= 6.1?
-fno-tree-loop-vectorize may help together with -fno-openmp for GCC >= 6.1.

Or build your test agains Glibc built with disabled Libmvec.

(some description of Libmvec is here -
https://sourceware.org/glibc/wiki/libmvec)


--
WBR,
Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]