This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Enhance FoldInsertPadIntoFill to support op chain
ClosedPublic

Authored by antiagainst on Feb 23 2022, 6:30 PM.

Details

Summary

If we have a chain of tensor.insert_slice ops inserting some
tensor.pad op into a linalg.fill and ranges do not overlap,
we can also elide the tensor.pad later.

Depends on D120410

Diff Detail

Event Timeline

antiagainst created this revision.Feb 23 2022, 6:30 PM
antiagainst requested review of this revision.Feb 23 2022, 6:30 PM
ThomasRaoux accepted this revision.Feb 28 2022, 1:04 PM
ThomasRaoux added inline comments.
mlir/test/Dialect/Linalg/canonicalize.mlir
715

You want a CHECK after CHECK-NOT otherwise it doesn't know where to stop. You can just check for return if nothing else.

This revision is now accepted and ready to land.Feb 28 2022, 1:04 PM
This revision was landed with ongoing or failed builds.Feb 28 2022, 1:54 PM
This revision was automatically updated to reflect the committed changes.
antiagainst marked an inline comment as done.