1.21 -fvectorize, -fno-vectorize

Enables and disables the generation of Advanced SIMD vector instructions directly from C or C++ code at optimization levels -O1 and higher.


The default depends on the optimization level in use.
At optimization level -O0 (the default optimization level), armclang never performs automatic vectorization. The -fvectorize and -fno-vectorize options are ignored.
At optimization level -O1, the default is -fno-vectorize. Use -fvectorize to enable automatic vectorization.
At optimization level -O2 and above, the default is -fvectorize. Use -fno-vectorize to disable automatic vectorization.


This example enables automatic vectorization with optimization level -O1:
armclang --target=arm-arm-none-eabi -march=armv8-a -fvectorize -O1 -c file.c
Related reference
1.2 -c
1.45 -O
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.