The Intel® C++ Compiler optimizations take effect at run time. For IA-32 systems, the compiler enhances processor-specific optimizations by inserting a code segment in the program that performs the run-time checks described below.
To prevent execution errors, the compiler inserts code in the program to check for proper processor usage. Programs compiled with options -xN, -xB, or -xP will check at run time whether they are being executed on the Intel® Pentium® 4 processor, Intel Pentium M processor, or the Intel processors code-named "Prescott", respectively, or a compatible Intel processor. If the program is not executed on one of these processors, the program terminates with an error.
To optimize the program prog.cpp for the Intel processors code-named "Prescott", issue the following command:
prompt>icpc -xP prog.cpp
The resulting executable aborts if it is executed on a processor that does not support the Intel processors code-named "Prescott", such as the Intel Pentium III or Intel Pentium 4 processor.
If you intend to run your programs on multiple IA-32 processors, do not use the -x{} options that optimize for processor-specific features; consider using -ax{} to attain processor specific performance and portability among different processors.
Previously, the values of the flags flush-to-zero (FTZ) and denormals-as-zero (DAZ) for IA-32 processors were off by default. However, even at the cost of losing IEEE compliance, turning these flags on significantly increases the performance of programs with denormal floating-point values in the gradual underflow mode run on the most recent IA-32 processors. Hence, for the Intel Pentium III, Pentium 4, Pentium M, Intel processors code-named "Prescott", and compatible IA-32 processors, the compiler's default behavior is to turn these flags on. The compiler inserts code in the program to perform a run-time check for the processor on which the program runs to verify it is one of the afore-listed Intel processors.
These flags are only turned on by Intel processors that have been validated to support them.
For non-Intel processors, you can set the flags manually with the following macros:
Enable FTZ: _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON)
Enable DAZ: _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON)
The prototypes for these macros are in xmmintrin.h (FTZ) and pmmintrin.h (DAZ).