Targeting IA-32 Architecture Processors Automatically

The -x (Linux* and Mac OS* X) or /Qx (Windows*) option can automatically optimize your application for specific Intel® processors based on IA-32 and Intel® 64 architectures.

The automatic optimizations allow you to take advantage of the architectural differences, new instruction sets, or advances in processor design; however, the resulting, optimized code might contain unconditional use of features that are not supported on other, earlier processors. Therefore, using these options effectively sets a minimum hardware requirement for your application.

The optimizations can include generating Intel® Streaming SIMD Extensions 4 (SSE4), Supplemental Streaming SIMD Extensions 3 (SSSE3), Streaming SIMD Extensions 3 (SSE3), Streaming SIMD Extensions 2 (SSE2), or Streaming SIMD Extensions (SSE) instructions.

If you intend to run your programs on multiple processors based on IA-32 or Intel® 64 architectures, do not use this option; instead, consider using the -ax (Linux and Mac OS X) or /Qax (Windows) option to achieve both processor-specific performance gains and portability among different processors.

Linux and Mac OS X

Windows

Description

-xS

/QxS

Can generate SSE4 Vectorizing Compiler and Media Accelerators instructions for future Intel processors that support the instructions. Can also generate SSSE3, SSE3, SSE2, and SSE instructions and optimize for future Intel processors.

Mac OS X: Supported on IA-32 architectures.

-xT

/QxT

Can generate SSSE3, SSE3, SSE2, and SSE instructions and can optimize for Intel processors, like the following:

  • Intel® Core™2 Quad processors

  • Quad-Core Intel® Xeon® processors

  • Intel® Xeon® processors based on the Intel® Core™ microarchitecture

  • Intel® Core™2 Duo processors

  • Intel® Core™2 Extreme processors

  • Other Intel processors based on the Intel® Core™ microarchitecture

Mac OS X: Supported on IA-32 and Intel® 64 architectures.

-xP

/QxP

Can generate SSE3, SSE2, and SSE instructions and can optimize for Intel processors, like the following:

  • Intel® Core™ Duo processors

  • Intel® Core™ Solo processors

  • Pentium® D processors

  • Intel Pentium® 4 processors with SSE3

  • Intel Celeron® M processors

  • Intel Celeron® D processors

  • Intel® Xeon® processors with SSE3

  • Other Intel processors based on Intel® Core™ microarchitecture or Intel NetBurst® microarchitecture

Mac OS X: Supported on IA-32 and Intel® 64 architectures.

-xO

/QxO

Can generate SSE3, SSE2, and SSE instructions. Generated code might operate on processors not made by Intel that support SSE3, SSE2 and SSE instruction sets.

Can optimize for Intel processors based on Intel® Core™ microarchitecture or Intel NetBurst® microarchitecture.

This value does not enable some optimizations enabled when using the S, T, or P processor values.

-xB

/QxB

Deprecated. Can generate SSE2 and SSE instructions for Intel processors and can optimize code for Intel® Pentium® M processors.

If this is the first time using this value consider using N or W instead.

-xN

/QxN

Can generate SSE2 and SSE instructions for Intel processors and can optimize code for the Pentium® 4 processor, and Intel® Xeon® processors with SSE2.

-xW

/QxW

This is the default value for Intel® 64 architecture systems.

Can generate SSE2 and SSE instructions and can optimize code for Intel Pentium® 4 processors and Intel® Xeon® processors with SSE2.

This value does not enable some optimizations enabled when using the B or N processor values.

-xK

/QxK

Can generate SSE instructions for Intel processors and can optimize code for Intel® Pentium® III processors and Intel Pentium® III Xeon® processors.

Generated code might operate on processors not made by Intel that support SSE instructions.

The O, W, and K processor values can produce binaries that might be capable of running on processors that support the instruction sets and features of Intel processor but are not made by Intel.

To prevent execution errors, the compiler inserts code in the main routine of the program to check for proper processor usage. Using this option limits you to a minimum processor level. For example, if you target an application to run on Intel® Xeon® processors based on the Intel® Core™ microarchitecture it is unlikely the resulting application will operate correctly on earlier Intel processors. If you target a processor and run the compiled executable on a system without the targeted processor, the application might fail with an illegal instruction exception or display other unexpected behavior.

If you target more than one processor value, the resulting code will be generated for the highest-performing processor specified if the compiler determines there is an advantage in doing so. The highest- to lowest-performing processor values are as follows:

  1. S

  2. T

  3. P

  4. O

  5. B

  6. N

  7. W

  8. K

Executing programs compiled with processor values of S, T, P, B, or N on unsupported processors will display a run-time error. For example, if you specify the T processor value to compile an application but execute the application on an Intel® Pentium® 4 processor, the application generates an error similar to the following:

Run-time Error

Fatal Error: This program was not built to run on the processor in your system.

The allowed processors are: Intel(R) Core(TM) Duo processors and compatible Intel processors with supplemental Streaming SIMD Extensions 3 (SSSE3) instruction support.
 

The following examples demonstrate compiling an application for Intel® Core™2 Duo processor and compatible processors. The resulting binary might not execute correctly on earlier processors or on IA-32 architecture processors not made by Intel Corporation.

Platform

Example

Linux and Mac OS X

ifort -xT sample.f90

Windows

ifort /QxT sample.f90

For more specific architecture support information, the following compiler option: