[Mlir-commits] [mlir] [mlir][memref] Make memref.cast areCastCompatible return true when meet same types (PR #192029)

Hocky Yudhiono llvmlistbot at llvm.org
Tue Apr 14 02:48:29 PDT 2026


================
@@ -894,12 +894,23 @@ func.func @invalid_memref_cast() {
 
 // -----
 
-// unranked to unranked
+// unranked incompatible element types
 func.func @invalid_memref_cast() {
   %0 = memref.alloc() : memref<2x5xf32, 0>
   %1 = memref.cast %0 : memref<2x5xf32, 0> to memref<*xf32, 0>
-  // expected-error at +1 {{operand type 'memref<*xf32>' and result type 'memref<*xf32>' are cast incompatible}}
-  %2 = memref.cast %1 : memref<*xf32, 0> to memref<*xf32, 0>
----------------
hockyy wrote:

If you're erasing this old testcase, better to move it to a valid.mlir?

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


More information about the Mlir-commits mailing list