@@ -307,7 +307,7 @@ class NegFOpConversion : public OpConversionPattern<arith::NegFOp> {
307
307
" negf currently only supports scalar types, not vectors or tensors" );
308
308
}
309
309
310
- if (!emitc::isSupportedFloatType (adaptedOpType)) {
310
+ if (!emitc::isFloatOrOpaqueType (adaptedOpType)) {
311
311
return rewriter.notifyMatchFailure (
312
312
op.getLoc (), " floating-point type is not supported by EmitC" );
313
313
}
@@ -655,7 +655,7 @@ class FtoICastOpConversion : public OpConversionPattern<CastOp> {
655
655
ConversionPatternRewriter &rewriter) const override {
656
656
657
657
Type operandType = adaptor.getIn ().getType ();
658
- if (!emitc::isSupportedFloatType (operandType))
658
+ if (!emitc::isFloatOrOpaqueType (operandType))
659
659
return rewriter.notifyMatchFailure (castOp,
660
660
" unsupported cast source type" );
661
661
@@ -710,7 +710,7 @@ class ItoFCastOpConversion : public OpConversionPattern<CastOp> {
710
710
if (!dstType)
711
711
return rewriter.notifyMatchFailure (castOp, " type conversion failed" );
712
712
713
- if (!emitc::isSupportedFloatType (dstType))
713
+ if (!emitc::isFloatOrOpaqueType (dstType))
714
714
return rewriter.notifyMatchFailure (castOp,
715
715
" unsupported cast destination type" );
716
716
@@ -745,15 +745,15 @@ class TruncFConversion : public OpConversionPattern<arith::TruncFOp> {
745
745
// attribute that we need to check. For now, the behavior is the default,
746
746
// i.e. truncate.
747
747
Type operandType = adaptor.getIn ().getType ();
748
- if (!emitc::isSupportedFloatType (operandType))
748
+ if (!emitc::isFloatOrOpaqueType (operandType))
749
749
return rewriter.notifyMatchFailure (castOp,
750
750
" unsupported cast source type" );
751
751
752
752
Type dstType = this ->getTypeConverter ()->convertType (castOp.getType ());
753
753
if (!dstType)
754
754
return rewriter.notifyMatchFailure (castOp, " type conversion failed" );
755
755
756
- if (!emitc::isSupportedFloatType (dstType))
756
+ if (!emitc::isFloatOrOpaqueType (dstType))
757
757
return rewriter.notifyMatchFailure (castOp,
758
758
" unsupported cast destination type" );
759
759
@@ -775,15 +775,15 @@ class ExtFConversion : public OpConversionPattern<arith::ExtFOp> {
775
775
matchAndRewrite (arith::ExtFOp castOp, typename arith::ExtFOp::Adaptor adaptor,
776
776
ConversionPatternRewriter &rewriter) const override {
777
777
Type operandType = adaptor.getIn ().getType ();
778
- if (!emitc::isSupportedFloatType (operandType))
778
+ if (!emitc::isFloatOrOpaqueType (operandType))
779
779
return rewriter.notifyMatchFailure (castOp,
780
780
" unsupported cast source type" );
781
781
782
782
Type dstType = this ->getTypeConverter ()->convertType (castOp.getType ());
783
783
if (!dstType)
784
784
return rewriter.notifyMatchFailure (castOp, " type conversion failed" );
785
785
786
- if (!emitc::isSupportedFloatType (dstType))
786
+ if (!emitc::isFloatOrOpaqueType (dstType))
787
787
return rewriter.notifyMatchFailure (castOp,
788
788
" unsupported cast destination type" );
789
789
0 commit comments