This is an archive of the discontinued LLVM Phabricator instance.

[X86] Improve cost model for subvector extraction of less than 128-bit vectors
ClosedPublic

Authored by craig.topper on Aug 7 2019, 10:14 AM.

Details

Summary

Now that we're using widening legalization. We need to improve our extract_subvector cost model for these types. This patch begins by modeling these as a subvector extract followed by a permute. I've left FIXMEs in the code for future improvements.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Aug 7 2019, 10:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2019, 10:14 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

Directly compute the permute cost so that we don't have high cost for i8/i16 element extracts.

@craig.topper I've added some (incomplete) vXi8 test coverage at rL368716

Rebase on top of the vXi8 tests.

Rebase for new test cases.

RKSimon accepted this revision.Aug 15 2019, 8:01 AM

LGTM - I've been trying to think of a general helper function we could create for this as I can only imagine that we're going to need this more....

This revision is now accepted and ready to land.Aug 15 2019, 8:01 AM
This revision was automatically updated to reflect the committed changes.