title: how verify that operating system support avx2 instructions
body: <p>I have configuration: Intel(R) Core(TM) i7-4702MQ CPU (with Haswell architecture), Windows 8, Intel C++ Compiller XE 13.0.
  I want run my program with avx2 optimization and put compilation flags:</p>
  
  <blockquote>
    <p>/QaxCORE-AVX2, /QxCORE-AVX2</p>
  </blockquote>
  
  <p>But when I run the program I get error: </p>
  
  <blockquote>
    <p>Fatal Error: This program was not built to run in your system. Please verify that both the operating system and the processor support Intel(R) AVX2, BMI, LZCNT, HLE, RTM, and FMA instructions.</p>
  </blockquote>
  
  <p>I run avx2 cpu support test which is given on page: <a href="https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family" rel="nofollow noreferrer">How to detect new instruction support in the 4th generation Intel Core processor family</a>. 
  Result:</p>
  
  <blockquote>
    <p>This CPU supports ISA extensions introduced in Haswell.</p>
  </blockquote>
  
  <p>How can I check that my operating system support avx2-extensions and what could be the cause of the error? For use avx2 extensions i need set both <code>/QaxCORE-AVX2</code> and <code>/QxCORE-AVX2</code> flags?</p>
  
  <p><strong>upd</strong>: if i set flag</p>
  
  <pre><code>/QxAVX
  </code></pre>
  
  <p>that program has been successfully launched.</p>