[mlir][tosa] Add folder for tosa.cast
authorRob Suderman <suderman@google.com>
Tue, 30 Aug 2022 00:20:38 +0000 (17:20 -0700)
committerRob Suderman <suderman@google.com>
Tue, 30 Aug 2022 00:21:24 +0000 (17:21 -0700)
commit088f15e346d68da2875d8ee618a05217559c25f2
tree097cbfb3c2026a2dfbcafd3f25b4f122c0ab6889
parent43e1fc58dd1f4524ea518f920dbe91924927ce4d
[mlir][tosa] Add folder for tosa.cast

Tosa.cast should fold on splats as it is trivial to fold the operation
into the splatted value.

Reviewed By: NatashaKnk

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