Skip to content

scalar.addf

← scalar dialect

Floating-point addition.

Operation contract

Property Value
Semantic phase executable
Traits Pure, Commutative, SafeToSpeculate

Signature

Kind Name Type Cardinality Description
Operand lhs float required —
Operand rhs float required —
Result result float required —
Attribute fastmath flags FastMathFlags optional —

Verification constraints

  • SameType(lhs, rhs, result)

Examples

%result = scalar.addf %lhs, %rhs : f32
%result = scalar.addf<fast> %lhs, %rhs : f32