[Mlir-commits] [mlir] [mlir][emitc] Support convert arith.extf and arith.truncf to emitc (PR #121184)
Marius Brehler
llvmlistbot at llvm.org
Wed Jan 15 03:35:03 PST 2025
================
@@ -733,6 +733,43 @@ class ItoFCastOpConversion : public OpConversionPattern<CastOp> {
}
};
+// Floating-point to floating-point conversions.
+template <typename CastOp>
+class FpCastOpConversion : public OpConversionPattern<CastOp> {
+public:
+ FpCastOpConversion(const TypeConverter &typeConverter, MLIRContext *context)
+ : OpConversionPattern<CastOp>(typeConverter, context) {}
+
+ LogicalResult
+ matchAndRewrite(CastOp castOp, typename CastOp::Adaptor adaptor,
+ ConversionPatternRewriter &rewriter) const override {
+ // Vectors in particular are not supported
----------------
marbre wrote:
NIT:
```suggestion
// Vectors in particular are not supported.
```
https://github.com/llvm/llvm-project/pull/121184
More information about the Mlir-commits
mailing list