Issue 55440
Summary [mlir] Crash when folding i1 reshape
Labels mlir:core
Assignees lattner
Reporter d0k
    ```
func.func @test() -> tensor<1xi1> {
  %0 = arith.constant dense<true> : tensor<1x1xi1>
  %1 = "tosa.reshape"(%0) {new_shape = [1]} : (tensor<1x1xi1>) -> tensor<1xi1>
  return %1 : tensor<1xi1>
}
```

```
$ mlir-opt -canonicalize reshape.mlir
mlir-opt: mlir/lib/IR/AttributeDetail.h:114: static mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy mlir::detail::DenseIntOrFPElementsAttrStorage::getKey(mlir::ShapedType, ArrayRef<char>, bool): Assertion `numElements != 1 && "splat of 1 element should already be detected"' failed.
```

This is a regression introduced by f21896f2c6dc6f4c2c3d0f192f7fefd178f5d5f7
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to