[AVX512] Correct isExtractSubvectorCheap so that it will return true for extracting 128-bits from the upper 256-bits of a 512-bit vector
ClosedPublic

Authored by craig.topper on Aug 11 2017, 2:24 PM.

Details

Summary

Currently this routine is only setup to return true if you're extracting half of a vector. But we should also be reporting that extracting a quarter is cheap too.

Don't have a test case just happened to notice.

Diff Detail

Repository
rL LLVM
craig.topper created this revision.Aug 11 2017, 2:24 PM

I also wonder if this interface shouldn't take the source type as input. In case some other target has multiple legal vector sizes but can't extract a quarter of vector like x86 can.

I also wonder if this interface shouldn't take the source type as input. In case some other target has multiple legal vector sizes but can't extract a quarter of vector like x86 can.

+1 for SrcVT as well as ResVT

Update to include the correct answer for mask registers. Which seems to be that will allow any extract of a 0 index and otherwise only extracts of upper half.

zvi accepted this revision.Aug 13 2017, 1:51 AM

LGTM

This revision is now accepted and ready to land.Aug 13 2017, 1:51 AM
This revision was automatically updated to reflect the committed changes.