3.2.2. Automatic vectorization

By coding in vectorizable loops instead of writing in explicit NEON instructions, code portability is preserved between processors. Performance levels similar to that of hand coded vectorization are achieved with less effort.

Example 3.1 provides an example of command-line options to invoke automatic vectorization on the Cortex-A8 processor.

Example 3.1.  Automatic vectorization

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

Note

You can also compile with -O2 -Otime, however, this does not give the maximum code performance.

Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0205J
Non-ConfidentialID101213