This is the mail archive of the gcc-help@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: How to make gcc vectorize identical statements?


Ah, that makes sense. If I had done correctly, I found the ix86_veclib_handler in i386.c which is distinct from glibc's external math-vector.h. However, is it possible/feasible to cheat gcc with '-mveclibabi' to force it do the analysis and then redirect the external call to glibc?

Yifei





At 2017-04-12 02:06:51, "Alexander Monakov" <amonakov@ispras.ru> wrote:
>On Tue, 11 Apr 2017, Yifei wrote:
>> I'm wondering why gcc fails to do a straightforward optimization? And how can
>> I do, as a work around, to avoid writing an explicit loop?
>
>(note, the example is vectorized with -mveclibabi={acml,svml}, but then it
>requires the corresponding external library and -ffast-math)
>
>Without -mveclibabi, this works for loop vectorization with recent Glibc,
>because it provides vectorized implementations in libmvec and has
>__attribute__((simd)) on a few math functions.
>
>However, using SIMD clones in SLP vectorization is currently not implemented
>(veclib calls and SIMD clones are handled via different paths)
>
>Alexander



 

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