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]

ARM NEON Intrinsics guide?


Hi Everyone,

I'm working on a port of some software to ARM v7, v7-a and v8-a, which
means SIMD coprocessor/NEON is available.

The performance increases when the data types are 32-bit using
int32x4_t vectors, but its not quite what I expected. As a
measurement, Clang produces code near the theoretical throughput, and
its about 2 cycles per byte faster than GCC. But GCC NEON is better
than the C/C++ measurements.

I'm not seeing the performance gain I expected when the data types are
64-bit using int64x2_t vectors. GCC produces code that's nowhere near
Clang or the theoretical limit. In fact, its slower than the C/C++
code.

I feel like I'm missing something with respect to using GCC and NEON
intrinsics. For example, maybe there's a technique or pattern to help
GCC minimizes stalls.

For completeness, here are the CFLAGS I am using:

    ARMv7:
        -DNDEBUG -O3 -march=armv7-a -mfpu=neon
        -DNDEBUG -O3 -mcpu=cortex-a7 -mfpu=neon

    ARMv8:
        -DNDEBUG -O3 -O3 -march=armv8-a+crc -mcpu=cortex-a53
        -DNDEBUG -O3 -O3 -march=armv8-a+crc -mcpu=cortex-a53 -mfpu=neon

Is there a GCC guide for NEON intinsics?


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