HomePhabricator

[MLIR][Standard] Add folding for indexCast(indexCast(x)) -> x

Authored by stephenneuendorffer on Dec 4 2019, 4:15 PM.

Description

[MLIR][Standard] Add folding for indexCast(indexCast(x)) -> x

Allow this only if the types are the same. e.g.:
i16 -> index -> i16 or
index -> i16 -> index

Differential Revision: https://reviews.llvm.org/D73671