[Mlir-commits] [mlir] [mlir][bufferize] Make drop-equivalent-buffer-results support mult blocks (PR #163388)
Matthias Springer
llvmlistbot at llvm.org
Fri Oct 17 01:58:50 PDT 2025
================
@@ -490,3 +490,32 @@ func.func @collapse_shape_regression(
tensor.collapse_shape %0[[0, 1]] : tensor<5x6xf32> into tensor<30xf32>
return
}
+
+// -----
+
+// CHECK-LABEL: func private @mult_return_callee(
+// CHECK-SAME: %[[T:.*]]: memref<?xf32, strided<[?], offset: ?>>, %[[COND:.*]]: i1,
+// CHECK-SAME: %[[A:.*]]: index, %[[B:.*]]: index) -> index {
+func.func private @mult_return_callee(%t: tensor<?xf32>, %cond:i1, %a: index, %b: index) -> (tensor<10xf32>, index) {
+ %casted = tensor.cast %t : tensor<?xf32> to tensor<10xf32>
+ // CHECK: cf.cond_br %[[COND]], ^bb1, ^bb2
+ // CHECK: ^bb1:
+ // CHECK: return %[[A]] : index
+ // CHECK: ^bb2:
+ // CHECK: return %[[B]] : index
+ cf.cond_br %cond,^a, ^b
+ ^a:
----------------
matthias-springer wrote:
nit: `^a:` and `^b:` should not be indented. (Same level as `func.func`.)
https://github.com/llvm/llvm-project/pull/163388
More information about the Mlir-commits
mailing list