This is an archive of the discontinued LLVM Phabricator instance.

[mlir][MemRef] Fix SubViewOp canonicalization when a subset of unit-dims are dropped.
ClosedPublic

Authored by mravishankar on Nov 29 2021, 3:35 PM.

Details

Summary

The canonical type of the result of the memref.subview needs to make
sure that the previously dropped unit-dimensions are the ones dropped
for the canonicalized type as well. This means the generic
inferRankReducedResultType cannot be used. Instead the current
dropped dimensions need to be querried and the same need to be dropped.

Diff Detail