You copied the Doc URL to your clipboard.

-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.

Note

The -fvectorize option is not supported for AArch64 state. The compiler never performs automatic vectorization for AArch64 state targets.

Default

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.

Example

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