Skip to content

Commit 068259b

Browse files
TinaAMDjorickert
authored andcommitted
Check valid emitc float/opaque types, not float (#525)
Use the emitc-provided function to check the types instead of checking for float types, as the other arith lowering do.
1 parent b872062 commit 068259b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class CmpFOpConversion : public OpConversionPattern<arith::CmpFOp> {
8484
matchAndRewrite(arith::CmpFOp op, OpAdaptor adaptor,
8585
ConversionPatternRewriter &rewriter) const override {
8686

87-
if (!isa<FloatType>(adaptor.getRhs().getType())) {
87+
if (!emitc::isFloatOrOpaqueType(adaptor.getRhs().getType())) {
8888
return rewriter.notifyMatchFailure(op.getLoc(),
8989
"cmpf currently only supported on "
9090
"floats, not tensors/vectors thereof");

0 commit comments

Comments
 (0)