This is an archive of the discontinued LLVM Phabricator instance.

[TTI] Fix uses of SK_ExtractSubvector shuffle costs (PR39368)
ClosedPublic

Authored by RKSimon on Oct 23 2018, 7:44 AM.

Details

Summary

Correct costings of SK_ExtractSubvector requires the SubTy argument to indicate the type/size of the extracted subvector.

Unlike the rest of the shuffle kinds this means that the main Ty argument represents the source vector type not the destination - if anyone wants to 'flip' this now is the time to ask before we start adding more reduction support!

I've done my best to fix a number of vectorizer uses:

SLP - AFAICT the reduction epilogue costs should be using a SK_PermuteSingleSrc shuffle as these all occur at the hardware vector width - we're not extracting (illegal) subvector types. This is causing the cost model diffs as SK_ExtractSubvector costs are poorly handled and tend to just return 1 at the moment.

LV - I'm not clear on what the SK_ExtractSubvector should represents for recurrences - I've used a <1 x ?> subvector extraction as that seems to match the VF delta but I need help here (@fhahn? @mssimpso?).

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Oct 23 2018, 7:44 AM
This revision is now accepted and ready to land.Oct 30 2018, 8:27 AM
This revision was automatically updated to reflect the committed changes.