This is an archive of the discontinued LLVM Phabricator instance.

[mlir][memref] Fold copy of cast
ClosedPublic

Authored by springerm on Jan 13 2022, 5:44 AM.

Details

Summary

If the source/dest is a cast that does not change shape/element type, the cast can be skipped.

Diff Detail

Event Timeline

springerm created this revision.Jan 13 2022, 5:44 AM
springerm requested review of this revision.Jan 13 2022, 5:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2022, 5:44 AM
nicolasvasilache accepted this revision.Jan 13 2022, 5:53 AM

thanks, you may want to look at other linalg.copy canonicalizations and foldings that may have been missed when memref.copy was introduced.

This revision is now accepted and ready to land.Jan 13 2022, 5:53 AM
This revision was automatically updated to reflect the committed changes.