This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Constant fold sub-vector extraction
ClosedPublic

Authored by kuhar on Nov 24 2022, 2:25 PM.

Details

Summary

This generalizes the existing fold for ExtractOp(non-splat constant)
to work with vector results. The vector case is handled by extracting
the subrange of attribute array.

My main use it to clean up code generated by the Wide Integer Emulation
pass.

Diff Detail

Event Timeline

kuhar created this revision.Nov 24 2022, 2:25 PM
Herald added a project: Restricted Project. · View Herald Transcript
kuhar requested review of this revision.Nov 24 2022, 2:25 PM
kuhar updated this revision to Diff 477849.Nov 24 2022, 2:45 PM

Add a splat test case

antiagainst accepted this revision.Nov 25 2022, 10:21 AM
This revision is now accepted and ready to land.Nov 25 2022, 10:21 AM
This revision was automatically updated to reflect the committed changes.