title: Preventing GCC from automatically using AVX and FMA instructions when compiled with -mavx and -mfma
body: <p>How can I disable auto-vectorization with AVX and FMA instructions? I would still prefer the compiler to employ SSE and SSE2 automatically, but not FMA and AVX.</p>
  
  <p>My code that uses AVX checks for its availability, but GCC doesn't do it when auto-vectorizing. So if I compile with <code>-mfma</code> and run the code on any CPU prior to Haswell I get <code>SIGILL</code>. How to solve this issue?</p>