This is an archive of the discontinued LLVM Phabricator instance.

[X86] Fix pshuflw formation from repeated shuffle mask (PR43230)
ClosedPublic

Authored by nikic on Sep 7 2019, 3:51 AM.

Details

Summary

Fix for https://bugs.llvm.org/show_bug.cgi?id=43230.

When creating PSHUFLW from a repeated shuffle mask, we have to apply the checks to the repeated mask, not the original one. For the test case from PR43230 the inspected part of the original mask is all undef.

Diff Detail

Repository
rL LLVM

Event Timeline

nikic created this revision.Sep 7 2019, 3:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2019, 3:51 AM
lebedev.ri added inline comments.
llvm/test/CodeGen/X86/vector-shuffle-256-v16.ll
4757 ↗(On Diff #219229)

Precommit, and note that 14'th channel shuffle is out-of-bounds

RKSimon accepted this revision.Sep 7 2019, 4:58 AM

Nice catch! LGTM, as @lebedev.ri suggested please pre-commit the test so when the fix is committed it shows the codegen diff.

This revision is now accepted and ready to land.Sep 7 2019, 4:58 AM
This revision was automatically updated to reflect the committed changes.