Skip to content

scalar.copysignf

scalar dialect

Copy sign of rhs onto magnitude of lhs.

Operation contract

Property Value
Semantic phase
Traits Pure

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.copysignf %lhs, %rhs : f32