[mlir][tosa] Disable folder for non-int/float/index types in tosa.slice
authorNatasha Kononenko <natashaknk@google.com>
Thu, 30 Mar 2023 17:57:55 +0000 (17:57 +0000)
committerRobert Suderman <suderman@google.com>
Thu, 30 Mar 2023 18:05:47 +0000 (18:05 +0000)
commit6a08c2be5880cdaee01031b55c79126ec3d688e2
treed3b4bff1efa16c993254c038d21b96aaef1cca96
parent339b8a0019658746217870215abca77291ad75b3
[mlir][tosa] Disable folder for non-int/float/index types in tosa.slice

In order to fold, we need to create an ElementsAttr, and those cannot be
generated from any type. In particular, currently we need to avoid folding
quantized types.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D147191
mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp