I am using ARM Cortex-A9 (zynq7000) and I want to enable the neon SIMD but not to use it for floating points unless specified.
When compiled by arm-none-eabi-gcc with following fpu options (seperately) :
the binaries 1 & 2 are different. But 2&3 are the same (vectorization not enabled), I am using -Og for optimization. ( -Og does not enable Vectorize options)
How can I make sure that all floating points are done in VFP, not the NEON when I use the option mfpu=neon-vfpv3?
According to the ARM Architecture Reference Manual, NEON and VFP support similar Instructions, which makes it difficult to distinguish the difference just by checking disassembly.
Moreover, I am planning to use #pragma GCC ivdep for the loops and functions that I need to vectorize, and what would be the appropriate compiler flags to achieve this?
The compiler will never use any neon
instruction unless auto vectorization is enabled or enforced via intrinsics.
Even though neon
and vfp
instructions look similar, they even operate in a different mode each.
There are a few instructions shared by vfp
and neon
on armv7
(mostly memory related), but they shouldn't be of any concern.
Why don't you post the disassemblies?