This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
ARM NEON Intrinsics guide?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 11 May 2016 02:03:36 -0400
- Subject: ARM NEON Intrinsics guide?
- Authentication-results: sourceware.org; auth=none
- Reply-to: noloader at gmail dot com
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?