[mlir] Fold trivial subtensor / subtensor_insert ops.
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Thu, 18 Feb 2021 21:33:03 +0000 (21:33 +0000)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Thu, 18 Feb 2021 21:34:55 +0000 (21:34 +0000)
commitb006902b2dfac792e8ade73798ca1b216654faf7
tree23177666a25ec1005c1c2b45319f7dc780fa3d98
parentb7e05c874b5b2a77c87df71ee3442abc2569cbb9
[mlir] Fold trivial subtensor / subtensor_insert ops.

Static subtensor / subtensor_insert of the same size as the source / destination tensor and root @[0..0] with strides [1..1] are folded away.

Differential revision: https://reviews.llvm.org/D96991
mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/Dialect/Standard/canonicalize.mlir