ARM Technical Support Knowledge Articles

Which ARM compiler options should be used to generate NEON instructions from C/C++ code?

Applies to: DS-5, RealView Development Suite (RVDS)


To generate NEON vector instructions from C/C++ code, the following compiler options must be specified:

In addition, use "--diag_warning=optimizations" to obtain useful diagnostics from the compiler on what it could or could not optimize/vectorize.

For example:

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.

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential