| |||
| Home > Using the NEON Vectorizing Compiler > Generating NEON instructions from C or C++ code | |||
You must use RVCT 3.1 or later, or ARM Compiler 4.1 or later, with a valid NEON compiler license.
To generate NEON instructions from C or C++ code, you must specify the following compiler options:
a target --cpu that has NEON
capability, for example Cortex-A8, Cortex-A9, or Cortex-A15
--vectorize to enable NEON vectorization
-O2 (default) or -O3 optimization
level
-Otime to optimize for performance
instead of code size.
You can also use --diag_warning=optimizations to
obtain useful diagnostics from the compiler on what it can and cannot
optimize or vectorize. For example:
armcc --cpu Cortex-A8 --vectorize -O3 -Otime --diag_warning=optimizations source.c
Compiler Reference:
Introducing the ARM Compiler toolchain: