This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Improve shuffling combining with horizontal operations
ClosedPublic

Authored by RKSimon on Oct 3 2017, 8:15 AM.

Details

Summary

Recognise cases when we can merge the shuffles with their horizontal (HADD/HSUB/PACK) instruction inputs.

Replaces an older implementation which performed some of this during lowering, expanding an existing target shuffle combine stage instead.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Oct 3 2017, 8:15 AM
This revision is now accepted and ready to land.Oct 6 2017, 3:55 PM
pcordes accepted this revision.Oct 6 2017, 10:54 PM

ASM output changes are all obvious improvements.

test/CodeGen/X86/vector-compare-results.ll
3532 ↗(On Diff #117531)

The extra instructions before the dumb stuff are gone again now. Yay?

Hopefully this is a sign that it's resistant to doing extra work in real extract situations, too.

This revision was automatically updated to reflect the committed changes.