This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Improve extraction of elements from v16i8 (pre-SSE41)
ClosedPublic

Authored by RKSimon on Feb 10 2017, 11:46 AM.

Details

Summary

Without SSE41 (pextrb) we currently extract byte elements from a vector by spilling to stack and reloading the byte.

This patch is an initial attempt at using MOVD/PEXTRW to extract the relevant DWORD/WORD from the vector and then shift+truncate to collect the correct byte.

Extraction of multiple bytes this way results in code bloat, but as explained in the patch we could probably afford to be more aggressive with the supported extractions before again falling back on spilling - possibly through counting the number of extracts and which DWORD/WORD they originate?

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Feb 10 2017, 11:46 AM
This revision was automatically updated to reflect the committed changes.