Intel® Compiler Options for Intel® SSE and Intel® AVX generation (SSE2, SSE3, SSE3_ATOM, SSSE3, SSE4.1, SSE4.2, AVX, AVX2) and processor-specific optimizations

Submit New Article

January 24, 2010 12:00 AM PST


 

What are the IA-32 and Intel® 64 processor targeting options in the 11.1, 12.0 and 12.1 compilers?
There are three main types of processor-specific optimization options:

  1. Processor-specific options of the form /arch:<code> on Windows* ( -m<code> on Linux* or Mac OS* X) generate specialized code for processors specified by <code>. The resulting executables from these processor-specific options can be run on the specified or later Intel® and compatible, non-Intel® processors that support the instruction set. The executable may incorporate optimizations specific to those processors and use a specific version of the Intel® Streaming SIMD Extensions (SSE) instruction set and/or the Intel® Advanced Vector Extensions (AVX) instruction set; on older processors without support for the corresponding instruction set, an illegal instruction or similar error may occur.
  2. Where the value for <code> can be:

    AVX May generate Intel® AVX, Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions.
    SSE4.2 May generate Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions.
    SSE4.1 May generate Intel® SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions.
    SSSE3 May generate Intel® SSSE3, SSE3, SSE2 and SSE instructions.
    SSE3 May generate Intel® SSE3, SSE2 and SSE instructions.
    SSE2 May generate Intel® SSE2 and SSE instructions. /arch:SSE2 is the default on Windows* and -msse2 is the default on Linux*.
    IA32 Generates generic IA-32 compatible code. Can only be used with the /arch: or -m switches. (IA-32 compiler only).

  3. Processor-specific options of the form /Qx<code> on Windows*( -x<code> on Linux* or Mac OS* X) generate specialized code for processors specified by <code>. The resulting executables from these processor-specific options can only be run on the specified or later Intel® processors, as they incorporate optimizations specific to those processors and use a specific version of the Streaming SIMD Extensions (SSE) instruction set and/or the Intel® Advanced Vector Extensions (AVX) instruction set. This switch enables some optimizations not enabled with the corresponding switches /arch:x<code> or -m<code>. A run-time check is inserted in the resulting executable that will halt the application if run on an incompatible processor. This is intended to help you quickly find out that the program was not intended for the processor it is running on and potentially avoids an illegal instruction error. For this check to be effective, the source file containing the main program or the dynamic library main function should be compiled with this option enabled.
  4. Where the value for <code> can be:

    CORE-AVX2 May generate Intel® AVX2, Intel® AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors. Optimizes for a future Intel processor.
    CORE-AVX-I May generate Intel® AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors, including instructions for 2nd generation Intel® Core™ processors in process technology smaller than 32nm. Optimizes for a future Intel processor.
    AVX May generate Intel® AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors. Optimizes for 2nd generation Intel® Core™ processors.
    SSE4.2 May generate Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors. Optimizes for the Intel® Core™ i7, i5 and i3 processor families and the Intel® Xeon® 55XX, 56XX and 75XX series.
    SSE4.1 May generate Intel® SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors. Optimizes for the 45nm Hi-k next generation Intel® Core™ microarchitecture.
    SSSE3 May generate Intel® SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors. Optimizes for Intel® Core™ microarchitecture. -xssse3 is the default for the Intel® 64 compiler on Mac OS* X.
    SSE3_ATOM May generate Intel® SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors. Optimizes for the Intel® Atom™ processor family and Intel® Centrino® Atom™ Processor Technology.
    SSE3 May generate Intel® SSE3, SSE2 and SSE instructions. Optimizes for the enhanced Pentium M processor microarchitecture and Intel® Netburst microarchitecture. -xsse3 is the default for the IA-32 compiler on Mac OS* X.
    SSE2 May generate Intel® SSE2 and SSE instructions. Optimizes for the Intel® Netburst microarchitecture.

  5. Processor-dispatch options of the form /Qax<code> on Windows* ( -ax<code> on Linux* or Mac OS* X) allow the generation of multiple code paths for Intel® processors. Processor dispatch technology performs a check at execution time to determine which processor the application is running on and use the most suitable code path for that processor. Compatible, non-Intel processors will take the default optimized code path. The switches described in 1. and 2. above can be used to modify the default optimized code path.
  6. Where the value for <code> can be:

    CORE-AVX2 May generate Intel® AVX2, Intel® AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors.
    CORE-AVX-I May generate Intel® AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors, including instructions for 2nd generation Intel® Core™ processors in process technology smaller than 32nm.
    AVX May generate Intel® AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors.
    SSE4.2 May generate Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors.
    SSE4.1 May generate Intel® SSE4.1,SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors.
    SSSE3 May generate Intel® SSSE3, SSE3, SSE2 and SSE instructions for Intel® processors.
    SSE3 May generate Intel® SSE3, SSE2 and SSE instructions for Intel® processors.
    SSE2 May generate Intel® SSE2 and SSE instructions for Intel® processors.

Which processor-specific option is best for my processor?

CORE-AVX2 a future Intel processor
CORE-AVX-I a future Intel processor
AVX 2nd Generation Intel® Core™ Processors
SSE4.2 Intel® Core™ i7 Processors
Intel® Core™ i5 Processors
Intel® Core™ i3 Processors
Intel® Xeon® 55XX series
Intel® Xeon® 56XX series
Intel® Xeon® 75XX series
SSE4.1 Intel® Xeon® 74XX series
Quad-Core Intel® Xeon 54XX, 33XX series
Dual-Core Intel® Xeon 52XX, 31XX series
Intel® Core™ 2 Extreme 9XXX series
Intel® Core™ 2 Quad 9XXX series
Intel® Core™ 2 Duo 8XXX series
Intel® Core™ 2 Duo E7200
SSSE3 Quad-Core Intel® Xeon® 73XX, 53XX, 32XX series
Dual-Core Intel® Xeon® 72XX, 53XX, 51XX, 30XX series
Intel® Core™ 2 Extreme 7XXX, 6XXX series
Intel® Core™ 2 Quad 6XXX series
Intel® Core™ 2 Duo 7XXX (except E7200), 6XXX, 5XXX, 4XXX series
Intel® Core™ 2 Solo 2XXX series
Intel® Pentium® dual-core processor E2XXX, T23XX series
SSE3_ATOM Intel® Atom™ processors
SSE3 Dual-Core Intel® Xeon® 70XX, 71XX, 50XX Series
Dual-Core Intel® Xeon® processor (ULV and LV) 1.66, 2.0, 2.16
Dual-Core Intel® Xeon® 2.8
Intel® Xeon® processors with SSE3 instruction set support
Intel® Core™ Duo
Intel® Core™ Solo
Intel® Pentium® dual-core processor T21XX, T20XX series
Intel® Pentium® processor Extreme Edition
Intel® Pentium® D
Intel® Pentium® 4 processors with SSE3 instruction set support
SSE2(default) Intel® Xeon® processors
Intel® Pentium® 4 processors
Intel® Pentium® M
IA32 Intel® Pentium® III Processor
Intel® Pentium® II Processor
Intel® Pentium® Processor

 


Which processor is targeted by default?

  • On IA-32 systems running Windows*, /arch:SSE2 is on by default. On IA-32 systems running Linux*, -msse2 is on by default. The resulting code path should run on the Intel Pentium 4 and Intel Xeon processors with SSE2 support and other later Intel processors or compatible non-Intel processors with SSE2 support.
  • On IA-32 systems running Mac OS* X, -xSSE3 is on by default. The compiler may generate SSE3, SSE2 and SSE instructions and the code is optimized for enhanced Pentium M processor microarchitecture.
  • On Intel 64 systems running Mac OS* X, -xSSSE3 is on by default. The compiler may generate SSSE3, SSE3, SSE2 and SSE instructions and the code is optimized for the Intel® Core™ microarchitecture.

To target older IA-32 systems without support for SSE2 instructions, such as systems based on the Intel® Pentium® III Processor, use the switch /arch:ia32 (Windows*) or -mia32 (Linux*).

For information about other, older processor targeting options and their relation to the recommended options above, see
http://software.intel.com/en-us/articles/ia-32-and-intel64-processor-targeting-overview/


Other common questions
(continuation article)

 

Optimization Notice
Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for
optimizations that are not unique to Intel microprocessors. These optimizations include SSE2,
SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the
availability, functionality, or effectiveness of any optimization on microprocessors not
manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for
use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are
reserved for Intel microprocessors. Please refer to the applicable product User and Reference
Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804


Do you need more help?


This article applies to: Financial Services Industry,   Game Development,   Intel Software Network communities,   Intel SW Partner program,   Intel® AppUp(SM) Developer Community,   Parallel Programming,   Pentium,   Server Developer Community,   Tools,   Visual Computing,   Xeon,   Intel® C++ Compiler for Linux* Knowledge Base,   Intel® C++ Compiler for Mac OS X* Knowledge Base,   Intel® C++ Compiler for Windows* Knowledge Base,   Intel® Fortran Compiler for Linux* Knowledge Base,   Intel® Fortran Compiler for Mac OS X* Knowledge Base,   Intel® Parallel Composer Knowledge Base,   Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base,   Intel® Visual Fortran Compiler for Windows* Knowledge Base