@@ -307,7 +307,7 @@ class NegFOpConversion : public OpConversionPattern<arith::NegFOp> {
307307 " negf currently only supports scalar types, not vectors or tensors" );
308308 }
309309
310- if (!emitc::isSupportedFloatType (adaptedOpType)) {
310+ if (!emitc::isFloatOrOpaqueType (adaptedOpType)) {
311311 return rewriter.notifyMatchFailure (
312312 op.getLoc (), " floating-point type is not supported by EmitC" );
313313 }
@@ -655,7 +655,7 @@ class FtoICastOpConversion : public OpConversionPattern<CastOp> {
655655 ConversionPatternRewriter &rewriter) const override {
656656
657657 Type operandType = adaptor.getIn ().getType ();
658- if (!emitc::isSupportedFloatType (operandType))
658+ if (!emitc::isFloatOrOpaqueType (operandType))
659659 return rewriter.notifyMatchFailure (castOp,
660660 " unsupported cast source type" );
661661
@@ -710,7 +710,7 @@ class ItoFCastOpConversion : public OpConversionPattern<CastOp> {
710710 if (!dstType)
711711 return rewriter.notifyMatchFailure (castOp, " type conversion failed" );
712712
713- if (!emitc::isSupportedFloatType (dstType))
713+ if (!emitc::isFloatOrOpaqueType (dstType))
714714 return rewriter.notifyMatchFailure (castOp,
715715 " unsupported cast destination type" );
716716
@@ -745,15 +745,15 @@ class TruncFConversion : public OpConversionPattern<arith::TruncFOp> {
745745 // attribute that we need to check. For now, the behavior is the default,
746746 // i.e. truncate.
747747 Type operandType = adaptor.getIn ().getType ();
748- if (!emitc::isSupportedFloatType (operandType))
748+ if (!emitc::isFloatOrOpaqueType (operandType))
749749 return rewriter.notifyMatchFailure (castOp,
750750 " unsupported cast source type" );
751751
752752 Type dstType = this ->getTypeConverter ()->convertType (castOp.getType ());
753753 if (!dstType)
754754 return rewriter.notifyMatchFailure (castOp, " type conversion failed" );
755755
756- if (!emitc::isSupportedFloatType (dstType))
756+ if (!emitc::isFloatOrOpaqueType (dstType))
757757 return rewriter.notifyMatchFailure (castOp,
758758 " unsupported cast destination type" );
759759
@@ -775,15 +775,15 @@ class ExtFConversion : public OpConversionPattern<arith::ExtFOp> {
775775 matchAndRewrite (arith::ExtFOp castOp, typename arith::ExtFOp::Adaptor adaptor,
776776 ConversionPatternRewriter &rewriter) const override {
777777 Type operandType = adaptor.getIn ().getType ();
778- if (!emitc::isSupportedFloatType (operandType))
778+ if (!emitc::isFloatOrOpaqueType (operandType))
779779 return rewriter.notifyMatchFailure (castOp,
780780 " unsupported cast source type" );
781781
782782 Type dstType = this ->getTypeConverter ()->convertType (castOp.getType ());
783783 if (!dstType)
784784 return rewriter.notifyMatchFailure (castOp, " type conversion failed" );
785785
786- if (!emitc::isSupportedFloatType (dstType))
786+ if (!emitc::isFloatOrOpaqueType (dstType))
787787 return rewriter.notifyMatchFailure (castOp,
788788 " unsupported cast destination type" );
789789
0 commit comments