title: How to check if compiled code uses SSE and AVX instructions?
body: <p>I wrote some code to do a bunch of math, and it needs to go fast, so I need it to use SSE and AVX instructions. I'm compiling it using g++ with the flags <code>-O3</code> and <code>-march=native</code>, so I think it's using SSE and AVX instructions, but I'm not sure. Most of my code looks something like the following:</p>
  
  <pre><code>for(int i = 0;i&lt;size;i++){
      a[i] = b[i] * c[i];
  }
  </code></pre>
  
  <p>Is there any way I can tell if my code (after compilation) uses SSE and AVX instructions? I think I could look at the assembly to see, but I don't know assembly, and I don't know how to see the assembly that the compiler outputs.</p>