[Mlir-commits] [mlir] [mlir][emitc] Support convert arith.extf and arith.truncf to emitc (PR #121184)
Marius Brehler
llvmlistbot at llvm.org
Thu Jan 9 15:12:11 PST 2025
================
@@ -149,3 +149,43 @@ func.func @arith_remui_vector(%arg0: vector<5xi32>, %arg1: vector<5xi32>) -> vec
%divui = arith.remui %arg0, %arg1 : vector<5xi32>
return %divui: vector<5xi32>
}
+
+// -----
+
+func.func @arith_truncf(%arg0: f64) -> f32 {
+ // expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
+ %truncd = arith.truncf %arg0 to_nearest_away : f64 to f32
+ return %truncd : f32
+}
+
+// -----
+
+func.func @arith_extf_f128(%arg0: f32) -> f128 {
+ // expected-error @+1 {{failed to legalize operation 'arith.truncf'}}
----------------
marbre wrote:
```suggestion
// expected-error @+1 {{failed to legalize operation 'arith.extf'}}
```
Your test are failing due to some copy paste errors.
https://github.com/llvm/llvm-project/pull/121184
More information about the Mlir-commits
mailing list