8.192 --vectorize, --no_vectorize

Enables and disables the generation of NEON vector instructions directly from C or C++ code.


The default is --no_vectorize.


The following options must be specified for loops to vectorize:


Target processor must have NEON capability.


Type of optimization to reduce execution time.


Level of optimization. One of the following must be used:

  • -O2 High optimization. This is the default.

  • -O3 Maximum optimization.


This example invokes automatic vectorization on the Cortex-A8 processor.

armcc --vectorize --cpu=Cortex-A8 -O3 -Otime -c file.c

Using the command-line options -O3 and -Otime ensures that the code achieves significant performance benefits in addition to those of vectorization.


You can also compile with -O2 -Otime. However, this does not give the maximum code performance.
Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.