This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Add constant folding for tosa.slice
ClosedPublic

Authored by rsuderman on Aug 23 2022, 1:46 PM.

Details

Summary

If the input to a tosa.slice operation is a splat we can just replace with
another splat. If the result is a single element, replacing with a splat
is universally useful.

Diff Detail

Event Timeline

rsuderman created this revision.Aug 23 2022, 1:46 PM
Herald added a project: Restricted Project. · View Herald Transcript
rsuderman requested review of this revision.Aug 23 2022, 1:46 PM
NatashaKnk accepted this revision.Aug 23 2022, 2:49 PM
This revision is now accepted and ready to land.Aug 23 2022, 2:49 PM
rsuderman updated this revision to Diff 455026.Aug 23 2022, 5:16 PM

Fixed test to use valid size/start indices

This revision was automatically updated to reflect the committed changes.