This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] lowerShuffleAsLanePermuteAndPermute - fully populate the lane shuffle mask (PR40730)
ClosedPublic

Authored by RKSimon on Feb 14 2019, 7:49 AM.

Details

Summary

As detailed on PR40730, we are not correctly filling in the lane shuffle mask (D53148/rL344446) - we fill in for the correct src lane but don't add it to the correct mask element, so any reference to the correct element is likely to see an UNDEF mask index.

This allows constant folding to propagate UNDEFs prior to the lane mask being (correctly) lowered to vperm2f128.

This patch fixes the issue by fully populating the lane shuffle mask - this is more than is necessary (if we only filled in the required mask elements we might be able to match other shuffle instructions - broadcasts etc.), but its the most cautious approach as this needs to be cherrypicked into the 8.0.0 release branch.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Feb 14 2019, 7:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2019, 7:49 AM
This revision is now accepted and ready to land.Feb 14 2019, 6:48 PM
This revision was automatically updated to reflect the committed changes.