This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Custom legalize v2s16 G_SHUFFLE_VECTOR
ClosedPublic

Authored by arsenm on Jan 7 2020, 6:24 AM.

Details

Summary

Try to keep simple v2s16 cases as-is. This will more naturally map to
how the VOP3P op_sel modifiers work compared to the expansion
involving bitcasts and bitshifts.

This could maybe try harder with wider source vector types, although
that could be handled with a pre-legalize combine.

Diff Detail

Event Timeline

arsenm created this revision.Jan 7 2020, 6:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2020, 6:24 AM

This makes sense, but I do have one comment.

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
1592

Given that the function only does what the name implies when the MI is an s16 shuffle, maybe either inline it at the single use site or figure out a better name for it?

arsenm updated this revision to Diff 237210.Jan 9 2020, 2:48 PM

Rename function

arsenm updated this revision to Diff 240265.Jan 24 2020, 12:09 PM

Rebase for shuffle mask operand type change

This revision is now accepted and ready to land.Jan 27 2020, 7:54 AM