3.4 Generating NEON instructions from C or C++ code

To generate NEON instructions from C or C++ code, you must specify particular compiler options.

You must use RVCT 3.1 or later, and ARM Compiler 4.1, with a valid NEON compiler license. ARM Compiler 5.01 and later do not require a separate NEON compiler license.

To generate NEON instructions from C or C++ code, specify the following compiler options:

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


To run code that contains NEON instructions, you must enable both the FPU and NEON.

Related concepts
3.2 The NEON unit
3.3 Methods of writing code for NEON
5.5 Enabling NEON and FPU for bare-metal
Related tasks
5.4 Selecting the target processor at compile time
Related reference
8.189 --vectorize, --no_vectorize
8.38 --cpu=list
8.39 --cpu=name compiler option
3.5 NEON C extensions
Related information
Licensed features of ARM Compiler
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.