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

Authored by RKSimon on Tue, Oct 3, 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
RKSimon created this revision.Tue, Oct 3, 8:15 AM
This revision is now accepted and ready to land.Fri, Oct 6, 3:55 PM
pcordes accepted this revision.Fri, Oct 6, 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.