HomePhabricator

[mlir] Remove incorrect folding for SubTensorInsertOp

Authored by mravishankar on Mar 3 2021, 1:56 PM.

Description

[mlir] Remove incorrect folding for SubTensorInsertOp

The SubTensorInsertOp has a requirement that dest type and result
type match. Just folding the tensor.cast operation violates this and
creates verification errors during canonicalization. Also fix other
canonicalization methods that werent inserting casts properly.

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