This is an archive of the discontinued LLVM Phabricator instance.

[X86][Costmodel] `getReplicationShuffleCost()`: promote 1 bit-wide elements to 16 bit when have AVX512BW
ClosedPublic

Authored by lebedev.ri on Nov 15 2021, 10:04 AM.

Details

Summary

Here we get pretty lucky. AVX512F does not provide any instructions
to convert between a k vector mask and a vector,
but AVX512BW adds {k}<->nX{i8,i16}conversions,
and just as it happens, with AVX512BW we have a i16 shuffle.

Diff Detail

Event Timeline

lebedev.ri created this revision.Nov 15 2021, 10:04 AM

To note this is basically the final batch, the only things left are
enabling i1->i8 promotion when +VBMI, i1->i32 when +DQ,
and then changing the getInterleavedMemoryOpCostAVX512()
to query the cost of replication of i1 mask, and i believe D111460 becomes unblocked.

lebedev.ri retitled this revision from X86][Costmodel] `getReplicationShuffleCost()`: promote 1 bit-wide elements to 16 bit when have AVX512BW to [X86][Costmodel] `getReplicationShuffleCost()`: promote 1 bit-wide elements to 16 bit when have AVX512BW.Nov 16 2021, 12:12 PM
RKSimon accepted this revision.Nov 19 2021, 2:36 AM

LGTM - BW + AV512F

This revision is now accepted and ready to land.Nov 19 2021, 2:36 AM

LGTM - BW + AV512F

Thank you for the review!