Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

fp-speculation, Qfp-speculation

Tells the compiler the mode in which to speculate on floating-point operations.

Syntax

Linux:

-fp-speculation=mode

macOS:

-fp-speculation=mode

Windows:

/Qfp-speculation:mode

Arguments

mode

Is the mode for floating-point operations. Possible values are:

fast

Tells the compiler to speculate on floating-point operations.

safe

Tells the compiler to disable speculation if there is a possibility that the speculation may cause a floating-point exception.

strict

Tells the compiler to disable speculation on floating-point operations.

off

This is the same as specifying strict. This feature is only available for ifort.

Default

-fp-speculation=fast
or /Qfp-speculation:fast

The compiler speculates on floating-point operations. This is also the behavior when optimizations are enabled.

However, if you specify no optimizations (-O0), the default changes:

Linux and macOS

In this case, the default is -fp-speculation=safe.

Windows

In this case, the default is /Qfp-speculation:safe.

Description

This option tells the compiler the mode in which to speculate on floating-point operations.

Disabling speculation may prevent the vectorization of some loops containing conditionals.

IDE Equivalent

Visual Studio: Floating Point > Floating-Point Speculation

Alternate Options

None