[Mlir-commits] [mlir] [mlir][bufferization] Add XFAIL test for bufferize-function-boundaries returning unranked memref (PR #176746)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Feb 9 04:35:10 PST 2026


https://github.com/tridhapuku updated https://github.com/llvm/llvm-project/pull/176746

>From 4c4ea9647e58b2fbba8a7beabaebadfbc7f4680f Mon Sep 17 00:00:00 2001
From: tridhapuku <abhidipu863 at gmail.com>
Date: Mon, 19 Jan 2026 12:26:18 +0000
Subject: [PATCH] [mlir][bufferization] Add XFAIL regression test for one-shot
 bufferize dropping ranked return

---
 ...ze-func-boundary-ranked-from-unranked.mlir | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir

diff --git a/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir b/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir
new file mode 100644
index 0000000000000..e1b025b7b5d0a
--- /dev/null
+++ b/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir
@@ -0,0 +1,19 @@
+// RUN: mlir-opt %s -one-shot-bufferize="bufferize-function-boundaries" | FileCheck %s
+// XFAIL: *
+
+module {
+  func.func @foo(%arg0: tensor<64x20x40xf32>) -> tensor<64x20x40xf32> {
+    %u = tensor.cast %arg0 : tensor<64x20x40xf32> to tensor<*xf32>
+    %r = call @relu(%u) : (tensor<*xf32>) -> tensor<*xf32>
+    %b = tensor.cast %r : tensor<*xf32> to tensor<64x20x40xf32>
+    return %b : tensor<64x20x40xf32>
+  }
+  func.func private @relu(tensor<*xf32>) -> tensor<*xf32>
+}
+
+// CHECK-LABEL: func.func @foo
+// CHECK-SAME: -> memref<64x20x40xf32
+// CHECK: %[[R:.*]] = call @relu
+// CHECK: %[[C:.*]] = memref.cast %[[R]] : memref<*xf32> to memref<64x20x40xf32
+// CHECK: return %[[C]] : memref<64x20x40xf32
+



More information about the Mlir-commits mailing list