The use of ‑fvectorize for MVE vectorization is a [BETA] support feature.
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. When
using -fvectorize with -O1, vectorization might be inhibited in the absence of other
optimizations which might be present at -O2 or
higher.
At optimization level -O2 and above,
the default is -fvectorize. Use -fno-vectorize to disable automatic vectorization.
Using -fno-vectorize does not necessarily
prevent the compiler from emitting Advanced SIMD and MVE instructions. The compiler
or linker might still introduce Advanced SIMD or MVE instructions, such as when
linking libraries that contain these instructions.
Examples
This example enables automatic vectorization with optimization level
-O1:
To prevent the compiler from emitting Advanced SIMD instructions for
AArch32 targets, set the option -mfpu to the
correct value that does not include Advanced SIMD, for example fp-armv8:
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.