[mlir][tosa] Fold tosa.reshape with splat values
authorRob Suderman <suderman@google.com>
Tue, 30 Aug 2022 00:05:23 +0000 (17:05 -0700)
committerRob Suderman <suderman@google.com>
Tue, 30 Aug 2022 00:18:03 +0000 (17:18 -0700)
commit43e1fc58dd1f4524ea518f920dbe91924927ce4d
treecb82a2c2466466ff141c14622f3e6ba1da95dae0
parent221f7853b9939f05288e4aac23ec04bc438dead3
[mlir][tosa] Fold tosa.reshape with splat values

Folding reshapes of splats is trivial and should be canonicalized
away.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D132760
mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
mlir/test/Dialect/Tosa/constant-op-fold.mlir