[Mlir-commits] [mlir] [mlir][arith] Add `arith.fptofp` op (PR #188041)
Krzysztof Drewniak
llvmlistbot at llvm.org
Mon Mar 23 08:05:40 PDT 2026
================
@@ -838,3 +838,119 @@ func.func @supported_fp_type(%arg0: f32, %arg1: vector<4xf32>, %arg2: vector<4x8
%3 = arith.cmpf oeq, %arg0, %arg3 : f32
return
}
+
+// -----
+
+// CHECK-LABEL: func @fptofp_ext(
+// CHECK-SAME: %[[ARG0:.*]]: f16, %[[ARG1:.*]]: f32)
+func.func @fptofp_ext(%arg0 : f16, %arg1 : f32) {
+// CHECK-NEXT: = llvm.fpext %[[ARG0]] : f16 to f32
+ %0 = arith.fptofp %arg0 : f16 to f32
+// CHECK-NEXT: = llvm.fpext %[[ARG0]] : f16 to f64
+ %1 = arith.fptofp %arg0 : f16 to f64
+// CHECK-NEXT: = llvm.fpext %[[ARG1]] : f32 to f64
+ %2 = arith.fptofp %arg1 : f32 to f64
----------------
krzysz00 wrote:
Like this sort of thing makes pattern-matching confusing and needlessly creates redundancies in the IR.
https://github.com/llvm/llvm-project/pull/188041
More information about the Mlir-commits
mailing list