This is an archive of the discontinued LLVM Phabricator instance.

[X86] X86FixupInstTunings - add VPERMILPDri -> VSHUFPDrri mapping
ClosedPublic

Authored by RKSimon on Apr 22 2023, 10:25 AM.

Details

Summary

Similar to the original VPERMILPSri -> VSHUFPSrri mapping added in D143787, replacing VPERMILPDri -> VSHUFPDrri should never be any slower and saves an encoding byte.

The sibling VPERMILPDmi -> VPSHUFDmi mapping is trickier as we need the same shuffle mask in every lane (and it needs to be adjusted) - I haven't attempted that yet but we can investigate it in the future if there's interest.

Fixes #61060

Diff Detail

Event Timeline

RKSimon created this revision.Apr 22 2023, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 10:25 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
RKSimon requested review of this revision.Apr 22 2023, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 10:25 AM
This revision is now accepted and ready to land.Apr 22 2023, 11:47 AM
pengfei added inline comments.Apr 22 2023, 7:46 PM
llvm/lib/Target/X86/X86FixupInstTuning.cpp
132

Nit: EVEX and VEX? There's no SSE vpermilpd. Applies to vpermilps too.

RKSimon added inline comments.Apr 23 2023, 1:13 AM
llvm/lib/Target/X86/X86FixupInstTuning.cpp
132

Cheers - copy+pasta strikes again :)