Developer Guide and Reference

Contents

fma, Qfma

Determines whether the compiler generates fused multiply-add (FMA) instructions if such instructions exist on the target processor.

Syntax

Linux:
-fma
-no-fma
macOS:
-fma
-no-fma
Windows:
/Qfma
/Qfma-
Arguments
None
Default
-fma
or
/Qfma
If the instructions exist on the target processor, the compiler generates fused multiply-add (FMA) instructions.
However, if you specify
-fp-model strict
(Linux*
and
macOS*
)
or
/fp:strict
(Windows*)
, but do not explicitly specify
-fma
or
/Qfma
, the default is
-no-fma
or
/Qfma-
.
Description
This option determines whether the compiler generates fused multiply-add (FMA) instructions if such instructions exist on the target processor. When the
[Q]fma
option is specified, the compiler may generate FMA instructions for combining multiply and add operations. When the negative form of the
[Q]fma
option is specified, the compiler must generate separate multiply and add instructions with intermediate rounding.
This option has no effect unless setting CORE-AVX2 or higher is specified for option [Q]x,
-march
(Linux and
macOS*
), or
/arch
(Windows).

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804