vector.cmpf
← vector dialect
Lanewise floating-point comparison producing an i1 mask vector. The predicate attribute uses the scalar.cmpf ordered/unordered predicate names and applies independently to each lane.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, Elementwise |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
lhs |
vector |
required |
— |
| Operand |
rhs |
vector |
required |
— |
| Result |
result |
vector |
required |
— |
| Attribute |
predicate |
enum CmpFPredicate |
required |
— |
| Attribute |
fastmath |
flags FastMathFlags |
optional |
— |
Verification constraints
HasFloatElement(lhs)
HasI1Element(result)
SameKind(lhs, result)
SameShape(lhs, rhs, result)
SameElementType(lhs, rhs)
Examples
%m = vector.cmpf olt, %lhs, %rhs : vector<16xf32> -> vector<16xi1>