This is an archive of the discontinued LLVM Phabricator instance.

[X86] Improve codegen of bitcasts of BUILD_VECTOR to MMX register.
AbandonedPublic

Authored by craig.topper on Mar 11 2018, 1:06 AM.

Details

Reviewers
spatel
RKSimon
Summary

The 64 bit BUILD_VECTOR is normally going to be promoted to 128 bits by widening each element. This changes the size of each element and requires a shuffle to compress it back down to 64-bits. We also do the copy from XMM to MMX through memory.

This patch pads the vector with undef elements and emits and explicit XMM->MMX copy operation.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 11 2018, 1:06 AM

I still think its better to try and avoid SSE usage entirely for MMX build vectors (D43618)

craig.topper abandoned this revision.Mar 11 2018, 11:30 AM