@@ -1499,11 +1499,12 @@ Currently, only the following parameter attributes are defined:
14991499``nofpclass(<test mask>)``
15001500 This attribute applies to parameters and return values with
15011501 floating-point and vector of floating-point types, as well as
1502- arrays of such types. The test mask has the same format as the
1503- second argument to the :ref:`llvm.is.fpclass <llvm.is.fpclass>`,
1504- and indicates which classes of floating-point values are not
1505- permitted for the value. For example a bitmask of 3 indicates
1506- the parameter may not be a NaN.
1502+ :ref:`supported aggregates <fastmath_return_types>` of such types
1503+ (matching the supported types for :ref:`fast-math flags <fastmath>`).
1504+ The test mask has the same format as the second argument to the
1505+ :ref:`llvm.is.fpclass <llvm.is.fpclass>`, and indicates which classes
1506+ of floating-point values are not permitted for the value. For example
1507+ a bitmask of 3 indicates the parameter may not be a NaN.
15071508
15081509 If the value is a floating-point class indicated by the
15091510 ``nofpclass`` test mask, a :ref:`poison value <poisonvalues>` is
@@ -3685,9 +3686,9 @@ Fast-Math Flags
36853686
36863687LLVM IR floating-point operations (:ref:`fneg <i_fneg>`, :ref:`fadd <i_fadd>`,
36873688:ref:`fsub <i_fsub>`, :ref:`fmul <i_fmul>`, :ref:`fdiv <i_fdiv>`,
3688- :ref:`frem <i_frem>`, :ref:`fcmp <i_fcmp>`), :ref:`phi <i_phi>`,
3689- :ref:`select <i_select>` and :ref:`call <i_call>`
3690- may use the following flags to enable otherwise unsafe
3689+ :ref:`frem <i_frem>`, :ref:`fcmp <i_fcmp>`), and :ref:`phi <i_phi>`,
3690+ :ref:`select <i_select>`, or :ref:`call <i_call>` instructions that return
3691+ floating-point types may use the following flags to enable otherwise unsafe
36913692floating-point transformations.
36923693
36933694``fast``
@@ -3709,6 +3710,16 @@ floating-point transformations.
37093710 argument or zero result as insignificant. This does not imply that -0.0
37103711 is poison and/or guaranteed to not exist in the operation.
37113712
3713+ Note: For :ref:`phi <i_phi>`, :ref:`select <i_select>`, and :ref:`call <i_call>`
3714+ instructions, the following return types are considered to be floating-point
3715+ types:
3716+
3717+ .. _fastmath_return_types:
3718+
3719+ - Floating-point scalar or vector types
3720+ - Array types (nested to any depth) of floating-point scalar or vector types
3721+ - Homogeneous literal struct types of floating-point scalar or vector types
3722+
37123723Rewrite-based flags
37133724^^^^^^^^^^^^^^^^^^^
37143725
@@ -4343,7 +4354,7 @@ recursive, can be opaqued, and are never uniqued.
43434354:Examples:
43444355
43454356+------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4346- | ``{ i32, i32, i32 }`` | A triple of three ``i32`` values |
4357+ | ``{ i32, i32, i32 }`` | A triple of three ``i32`` values (this is a "homogeneous" struct as all element types are the same) |
43474358+------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
43484359| ``{ float, ptr }`` | A pair, where the first element is a ``float`` and the second element is a :ref:`pointer <t_pointer>`. |
43494360+------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -12472,9 +12483,8 @@ instruction's return value on the same edge).
1247212483The optional ``fast-math-flags`` marker indicates that the phi has one
1247312484or more :ref:`fast-math-flags <fastmath>`. These are optimization hints
1247412485to enable otherwise unsafe floating-point optimizations. Fast-math-flags
12475- are only valid for phis that return a floating-point scalar or vector
12476- type, or an array (nested to any depth) of floating-point scalar or vector
12477- types.
12486+ are only valid for phis that return :ref:`supported floating-point types
12487+ <fastmath_return_types>`.
1247812488
1247912489Semantics:
1248012490""""""""""
@@ -12523,8 +12533,8 @@ class <t_firstclass>` type.
1252312533#. The optional ``fast-math flags`` marker indicates that the select has one or more
1252412534 :ref:`fast-math flags <fastmath>`. These are optimization hints to enable
1252512535 otherwise unsafe floating-point optimizations. Fast-math flags are only valid
12526- for selects that return a floating-point scalar or vector type, or an array
12527- (nested to any depth) of floating-point scalar or vector types .
12536+ for selects that return :ref:`supported floating-point types
12537+ <fastmath_return_types>`. .
1252812538
1252912539Semantics:
1253012540""""""""""
@@ -12762,8 +12772,7 @@ This instruction requires several arguments:
1276212772#. The optional ``fast-math flags`` marker indicates that the call has one or more
1276312773 :ref:`fast-math flags <fastmath>`, which are optimization hints to enable
1276412774 otherwise unsafe floating-point optimizations. Fast-math flags are only valid
12765- for calls that return a floating-point scalar or vector type, or an array
12766- (nested to any depth) of floating-point scalar or vector types.
12775+ for calls that return :ref:`supported floating-point types <fastmath_return_types>`.
1276712776
1276812777#. The optional "cconv" marker indicates which :ref:`calling
1276912778 convention <callingconv>` the call should use. If none is
@@ -20527,8 +20536,8 @@ the explicit vector length.
2052720536#. The optional ``fast-math flags`` marker indicates that the select has one or
2052820537 more :ref:`fast-math flags <fastmath>`. These are optimization hints to
2052920538 enable otherwise unsafe floating-point optimizations. Fast-math flags are
20530- only valid for selects that return a floating-point scalar or vector type,
20531- or an array (nested to any depth) of floating-point scalar or vector types .
20539+ only valid for selects that return :ref:`supported floating-point types
20540+ <fastmath_return_types>` .
2053220541
2053320542Semantics:
2053420543""""""""""
@@ -20585,8 +20594,8 @@ is the pivot.
2058520594#. The optional ``fast-math flags`` marker indicates that the merge has one or
2058620595 more :ref:`fast-math flags <fastmath>`. These are optimization hints to
2058720596 enable otherwise unsafe floating-point optimizations. Fast-math flags are
20588- only valid for merges that return a floating-point scalar or vector type,
20589- or an array (nested to any depth) of floating-point scalar or vector types .
20597+ only valid for merges that return :ref:`supported floating-point types
20598+ <fastmath_return_types>` .
2059020599
2059120600Semantics:
2059220601""""""""""
0 commit comments