Sourcery G++ includes preliminary support for automatic generation of NEON SIMD vector code. Autovectorization is a compiler optimization where loops involving normal integer or floating-point code are transformed into loops that use NEON SIMD instruction to process several data elements at once.
To enable generation of NEON vector code specify
-ftree-vectorize -mfpu=neon -mfloat-abi=softfp
.
-mfpu=neon
also enables generations of VFPv3 scalar
floating-point code.
Sourcery G++ also includes preliminary support for manual generation
of NEON SIMD code using C intrinsic functions. These intrinsics,
the same as those supported by the ARM RVCT compiler, are defined
in the arm_neon.h
header
and are documented in the 'ARM NEON Intrinsics' section of the GCC
manual. The options -mfpu=neon
-mfloat-abi=softfp
must be specified to use these
intrinsics; -ftree-vectorize
is not required.
NEON support is still under active development. It has not been subject to extensive testing, and may not yet take full advantage of all the features provided by the NEON architecture.