[mlir][arithmetic] Add tests for IndexCast folding ops and fix assert
authorThomas Raoux <thomasraoux@google.com>
Mon, 3 Oct 2022 19:39:32 +0000 (19:39 +0000)
committerThomas Raoux <thomasraoux@google.com>
Mon, 3 Oct 2022 20:28:09 +0000 (20:28 +0000)
commitb9a0eb610642ed67a82a4f50f07c2f7c82c7c32b
tree1ce8da7b96e7ce6b4c271dd917421bfac5e03bef
parent89274584eeca019d1ebe6e22ebfa9d03ce8563f2
[mlir][arithmetic] Add tests for IndexCast folding ops and fix assert

Fix assert in IndexCastUI folding and add tests for both IndexCastOp and
IndexCastUIOp folding

Differential Revision: https://reviews.llvm.org/D135098
mlir/lib/Dialect/Arith/IR/ArithOps.cpp
mlir/test/Dialect/Arith/canonicalize.mlir