[Mlir-commits] [mlir] [mlir][emitc] arith.negf to EmitC conversion (PR #95372)

Simon Camphausen llvmlistbot at llvm.org
Mon Jun 17 02:42:16 PDT 2024


================
@@ -81,6 +81,22 @@ func.func @arith_cmpf_tensor(%arg0: tensor<5xf32>, %arg1: tensor<5xf32>) -> tens
 
 // -----
 
+func.func @arith_negf_tensor(%arg0: tensor<5xf32>) -> tensor<5xf32> {
+  // expected-error @+1 {{failed to legalize operation 'arith.negf'}}
+  %n = arith.negf %arg0 : tensor<5xf32>
+  return %n: tensor<5xf32>
+}
+
+// -----
+
+func.func @arith_negf_vector(%arg0: vector<5xf32>) -> vector<5xf32> {
+  // expected-error @+1 {{failed to legalize operation 'arith.negf'}}
+  %n = arith.negf %arg0 : vector<5xf32>
+  return %n: vector<5xf32>
+}
+
+// -----
+
----------------
simon-camp wrote:

Add a test for an unsupported bitwidth

https://github.com/llvm/llvm-project/pull/95372


More information about the Mlir-commits mailing list