[Mlir-commits] [mlir] [mlir][transform] add ApplyEraseUnusedOperandsAndResultsPatternsOp transform op (PR #225864)
Charitha Saumya
llvmlistbot at llvm.org
Wed Sep 23 10:53:09 PDT 2026
================
@@ -0,0 +1,32 @@
+// RUN: mlir-opt %s -transform-interpreter | FileCheck %s
+
+#map0 = affine_map<(d0) -> (d0)>
+func.func @remove_deadargs_generic_basic(%arg0: tensor<?xf32>) -> (tensor<?xf32>) {
+ %c0 = arith.constant 0 : index
+ %cst = arith.constant 7.0 : f32
+ %0 = tensor.dim %arg0, %c0 : tensor<?xf32>
+ %1 = tensor.empty(%0) : tensor<?xf32>
+ %2 = tensor.empty(%0) : tensor<?xf32>
+ %3 = linalg.generic {indexing_maps = [#map0, #map0, #map0], iterator_types=["parallel"]} ins(%arg0, %1 : tensor<?xf32>, tensor<?xf32>) outs (%2:tensor<?xf32>) {
+ ^bb0(%arg1: f32, %arg2: f32, %arg3: f32):
+ %4 = arith.addf %arg1, %cst : f32
+ linalg.yield %4 : f32
----------------
charithaintc wrote:
indentation looks off here?
https://github.com/llvm/llvm-project/pull/225864
More information about the Mlir-commits
mailing list