title: Aarch64 GCC equivalent option for "-mfpu=neon"?
body: <p>I have a C code which uses Neon Intrinsics which will run in a Raspberry Pi 4 (Cortex-A72).
  When I compile the code with the built-in GCC:</p>
  <ol>
  <li><p>In Raspberry Pi OS <strong>32-bits</strong> (<em>ARM - armv7l</em>), if I run</p>
  <p><code>gcc -o test test.c -march=native -mcpu=native -mtune=native -O3 -g</code></p>
  <p>I get a performance of <strong>1,100,000 ns</strong> (the number change with each test but it's more than 1 million).</p>
  </li>
  <li><p>Still in Raspberry Pi OS <strong>32-bits</strong>, if I run</p>
  <p><code>gcc -o test test.c -march=native -mcpu=native -mtune=native -mfpu=neon -O3 -g</code></p>
  <p>i.e., adding <strong>-mfpu=neon</strong>, I get a performance of <strong>12,000 ns</strong> (because the code was designed to use the parallelism provided by <em>vaddq_u32</em>, <em>veorq_u32</em> and others.</p>
  </li>
  <li><p>Now, in Raspberry PI OS <strong>64-bits (aarch64)</strong>, if I run</p>
  <p><code>gcc -o test test.c -march=native -mcpu=native -mtune=native -O3 -g</code></p>
  <p>I get a performance of <strong>1,100,000 ns</strong> as well.</p>
  </li>
  </ol>
  <p>But there is the problem. There is no <strong>-mfpu</strong> supported by GCC on aarch64, and supposedly SIMD+FP is on by default on aarch64, but the performance is still bad.</p>
  <p>Things that I've tried:</p>
  <ol>
  <li><p>Build with the built-in GCC with <strong>-march=armv8-a+simd -mcpu=cortex-a72+simd</strong> and similar options for <strong>-march</strong> to use SIMD+FP, but the performance is still slow. (The list of options is here: <a href="https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html" rel="nofollow noreferrer">https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html</a>)</p>
  </li>
  <li><p>Use cross-compilers (like GCC-arm-none-elf and GCC-arm-none-eabi) from the ARM developer site. Some of their gcc versions have the -mfpu option, but either I get too many errors or the performance is the same. (<a href="https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads" rel="nofollow noreferrer">https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads</a>)</p>
  </li>
  </ol>
  <p>Is there (in the <strong>aarch64 built-in GCC</strong>) any command that <em>forces</em> to use SIMD+FP as <strong>-mfpu</strong> for 32-bits built-in GCC?</p>
  <p>Thank you.</p>