CmpIOpAdaptor cmpIOpOperands(operands);
Type operandType = cmpIOp.lhs().getType();
- if (!operandType.isa<IntegerType>() ||
- operandType.cast<IntegerType>().getWidth() != 1)
+ if (!isBoolScalarOrVector(operandType))
return failure();
switch (cmpIOp.getPredicate()) {
CmpIOpAdaptor cmpIOpOperands(operands);
Type operandType = cmpIOp.lhs().getType();
- if (operandType.isa<IntegerType>() &&
- operandType.cast<IntegerType>().getWidth() == 1)
+ if (isBoolScalarOrVector(operandType))
return failure();
switch (cmpIOp.getPredicate()) {
return
}
+// CHECK-LABEL: @vecboolcmpi
+func @vecboolcmpi(%arg0 : vector<4xi1>, %arg1 : vector<4xi1>) {
+ // CHECK: spv.LogicalEqual
+ %0 = cmpi "eq", %arg0, %arg1 : vector<4xi1>
+ // CHECK: spv.LogicalNotEqual
+ %1 = cmpi "ne", %arg0, %arg1 : vector<4xi1>
+ return
+}
+
} // end module
// -----