This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Avoid using `tensor.cast` by default while folding `fill` with `pad`.
ClosedPublic

Authored by mravishankar on Nov 4 2022, 9:24 PM.

Details

Summary

This is unnecessary if the generated operation type already matches
the type of the replaced value. Also use OpFoldResult to reduce the
number of cases the casts are needed.

Diff Detail

Event Timeline

mravishankar created this revision.Nov 4 2022, 9:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2022, 9:24 PM
mravishankar requested review of this revision.Nov 4 2022, 9:24 PM
springerm accepted this revision.Nov 5 2022, 8:24 AM
This revision is now accepted and ready to land.Nov 5 2022, 8:24 AM
hanchung accepted this revision.Nov 7 2022, 10:26 AM
antiagainst accepted this revision.Nov 7 2022, 10:32 AM