This is an archive of the discontinued LLVM Phabricator instance.

[X86] Update X86InstCombineIntrinsic to use CreateShuffleVector with one vector
ClosedPublic

Authored by aqjune on Jan 4 2021, 8:40 PM.

Details

Summary

This patch updates X86InstCombineIntrinsic.cpp to use the newly updated CreateShuffleVector.

The tests are updated because the updated CreateShuffleVector uses poison value for the second vector.
If I didn't miss something, the masks in the tests are choosing elements from the first vector only; therefore the tests are having equivalent behavior.

Diff Detail

Event Timeline

aqjune created this revision.Jan 4 2021, 8:40 PM
aqjune requested review of this revision.Jan 4 2021, 8:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2021, 8:40 PM
aqjune retitled this revision from [X86] Update X86InstCombineIntrinsic to use unary CreateShuffleVector to [X86] Update X86InstCombineIntrinsic to use CreateShuffleVector with one vector.
RKSimon added inline comments.Jan 5 2021, 2:13 AM
llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp
244

This is a (hidden) unary shuffle as well - please can you update ?

aqjune updated this revision to Diff 314567.Jan 5 2021, 4:41 AM

Fixed, thanks :)

aqjune marked an inline comment as done.Jan 5 2021, 4:41 AM
RKSimon accepted this revision.Jan 5 2021, 5:38 AM

LGTM cheers

This revision is now accepted and ready to land.Jan 5 2021, 5:38 AM