Processor-specific Run-time Checks, IA-32 Systems

The Intel Fortran Compiler optimizations take effect at run-time. For IA-32 systems, the compiler enhances processor-specific optimizations by inserting in the main routine a code segment that performs run-time checks described below.

Check for Supported Processor with -xB , -xB, or -xP

To prevent from execution errors, the compiler inserts code in the main routine of the program to check for proper processor usage. Programs compiled with options -xN, -xB, or -xP check at run-time whether they are being executed on the Intel PentiumŪ 4, IntelŪ PentiumŪ M processor or the Intel processor 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.

Example

To optimize a program foo.f90 for an Intel processor code-named "Prescott," issue the following command:

ifort -xP foo.f90 -o foo.exe

foo.exe aborts if it is executed on a processor that is not validated to support the Intel processor code-named "Prescott," such as the Intel Pentium 4 processor (to account for the fact that "Prescott" may be a Pentium 4 processor with some feature enabling).

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.

Setting FTZ and DAZ Flags

Previously, the default status of the flags flush-to-zero (FTZ) and denormals-are-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 processor 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, the flags can be set manually by calling the following Intel Fortran intrinsic:
RESULT = FOR_SET_FPE (FOR_M_ABRUPT_UND)
.