Processor-specific Optimization (IA-32 only)

The -x (Linux*) or /Qx (Windows*) options target your program to run on a specific Intel® processor. The resulting code might contain unconditional use of features that are not supported on other processors.

Windows*

Linux*

Optimizes code for...

/QxK

-xK

Intel® Pentium® III and compatible Intel processors

/QxW

-xW

Intel® Pentium® 4 and compatible Intel processors; this is the default for Intel® EM64T systems

/QxN

-xN

Intel Pentium 4 and compatible Intel processors with Streaming SIMD Extensions 2 (SSE2)

/QxB

-xB

Intel Pentium M and compatible Intel processors

/QxP

-xP

Intel® Core™ Duo processors and Intel® Core™ Solo processors, Intel Pentium 4 processors with Streaming SIMD Extensions 3, and compatible Intel processors with Streaming SIMD Extensions 3 (SSE3)

/QxT

-xT

Intel® Core™2 Duo processors, Intel® Core™2 Extreme processors, and the Dual-Core Intel® Xeon® processor 5100 series

For the N, P, and T processor values, the compiler enables processor-specific optimizations that include advanced data layout and code restructuring to improve memory accesses for Intel processors.

On Intel® EM64T systems, W, P, and T are the only valid processor values.

On Intel-based systems running Mac OS*, P is the only valid processor value. For processors that support SSE2 or SSE3, specifying the N or P values may cause the resulting generated code to contain unconditional use of features that are not supported on other processors.

The default behavior varies depending on the operation system. For more information about the options listed in the table above, see the following topic:

The following examples compile an application for Intel Pentium 4 and compatible processors. The resulting binary might not execute correctly on Pentium, Pentium Pro, Pentium II, Pentium III, or Pentium with MMX™ technology processors, or on x86 processors not provided by Intel Corporation.

Platform

Example

Linux

icc -xW prog.cpp

Windows

icl /QxW prog.cpp

Caution

If a program compiled with -x (Linux) or /Qx (Windows) is executed on a non-compatible processor, it might fail with an illegal instruction exception or display other unexpected behavior. Executing programs compiled with -xN, -xB or -xP (Linux) or /QxN, /QxB or /QxP (Windows) on unsupported processors will display a run-time error similar to the following:

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