|ARM Technical Support Knowledge Articles|
To generate NEON vector instructions from C/C++ code, the following compiler options must be specified:
--cpu" that has NEON capability, such as Cortex-A8 or Cortex-A9 or Cortex-A5.neon. But it cannot be 7-A.
--vectorize" to enable NEON vectorization
-O2" (default) or "
-O3" optimization level
-Otime" to optimize for performance rather than code size
In addition, use "
--diag_warning=optimizations" to obtain useful diagnostics from the compiler on what it could or could not optimize/vectorize.
armcc --cpu Cortex-A8 --vectorize -O3 -Otime --diag_warning=optimizations source.c
You must use RVCT version 3.1 or later (as earlier versions can not generate NEON code), together with a valid NEON compiler license.
Note for RVDS users:
RVDS 3.1, 4.0 and 4.1 Professional versions come with a NEON compiler license, but RVDS 3.1, 4.0 and 4.1 Standard versions do not. Therefore, users of RVDS 3.1/4.0 Standard versions must first upgrade to RVDS 3.1/4.0/4.1 Professional to use the vectorizing compiler.
For more details please refer to the NEON vectorizing compiler documentation.
Did you find this article helpful? Yes No
How can we improve this article?