You copied the Doc URL to your clipboard.

ARM Compiler armclang Reference Guide : -fvectorize, -fno-vectorize

-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

Was this page helpful? Yes No