[Mlir-commits] [mlir] [mlir] [bufferize] fix crash when bufferize function without func.return returning op (PR #120675)

Matthias Springer llvmlistbot at llvm.org
Tue Dec 24 06:18:07 PST 2024


================
@@ -268,4 +268,10 @@ func.func @materialize_in_dest_raw(%f: f32, %f2: f32, %idx: index) -> (tensor<5x
   %r = tensor.extract %dest_filled[%idx] : tensor<5xf32>
 
   return %0, %r : tensor<5xf32>, f32
-}
\ No newline at end of file
+}
+
+// -----
+// CHECK-LABEL: @llvm_return
+func.func @llvm_return() {
+   llvm.return
----------------
matthias-springer wrote:

Bufferization should be done before lowering to LLVM. Tensor types are not valid LLVM types.

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


More information about the Mlir-commits mailing list