Issue 53099
Summary [mlir][tensor] tensor.cast + tensor.insert_slice canonicalization generates invalid IR
Labels new issue
Assignees
Reporter Hardcode84
    ```
// RUN: mlir-opt %s -split-input-file -canonicalize | FileCheck %s

func @foo(%arg0 : tensor<1x?xf32>, %arg1 : tensor<?x?xf32>, %arg2 : index, %arg3 : index, %arg4 : index, %arg5 : index, %arg6 : index, %arg7 : index) -> tensor<?x?xf32> {
  %0 = tensor.cast %arg0 : tensor<1x?xf32> to tensor<?x?xf32>
  %1 = tensor.insert_slice %0 into %arg1[%arg2, %arg3] [%arg4, %arg5] [%arg6, %arg7] : tensor<?x?xf32> into tensor<?x?xf32>
  return %1 : tensor<?x?xf32>
}
```

```
error: expected type to be 'tensor<?x?xf32>' or a rank-reduced version. (size mismatch)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to