This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] Combine shuffles extracted from a common vector
ClosedPublic

Authored by RKSimon on Apr 10 2019, 7:49 AM.

Details

Summary

A small step towards combining shuffles across vector sizes - this recognises when a shuffle's operands are all extracted from the same larger source and tries to combine to an unary shuffle of that source instead. Fixes one of the test cases from PR34380.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Apr 10 2019, 7:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2019, 7:49 AM
RKSimon marked an inline comment as done.Apr 10 2019, 7:51 AM
RKSimon added inline comments.
test/CodeGen/X86/avx512-shuffles/partial_permute.ll
4411 ↗(On Diff #194512)

This is annoying - I'd be happier if the mask in zmm2 was at least reduced to a <1,4> xmm load (or broadcasted) but that's a common issue in a lot of the masks generated in this patch.

spatel accepted this revision.Apr 25 2019, 12:55 PM

LGTM

test/CodeGen/X86/avx512-shuffles/partial_permute.ll
4411 ↗(On Diff #194512)

Mark this with a TODO and/or file a bug report, so we don't lose track?

This revision is now accepted and ready to land.Apr 25 2019, 12:55 PM
This revision was automatically updated to reflect the committed changes.