[Mlir-commits] [mlir] Draft: [mlir][tosa] Fix unranked tosa canonicalizations crashes (PR #188188)

Hocky Yudhiono llvmlistbot at llvm.org
Tue Mar 24 20:28:05 PDT 2026


================

----------------
hockyy wrote:

```
module {
  func.func @reverse_fold_splat_unranked_result() -> tensor<*xf32> {
    %0 = "tosa.const"() <{values = dense<1.000000e+00> : tensor<4xf32>}> : () -> tensor<4xf32>
    %1 = tosa.reverse %0 {axis = 0 : i32} : (tensor<4xf32>) -> tensor<*xf32>
    return %1 : tensor<*xf32>
  }
}

```

Oh yea good catch, if the input is constant (which reverse is now a no-op) it directly returned the value

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


More information about the Mlir-commits mailing list