This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GISel] Add missing V2S16 BUILD_VECTOR_TRUNC legalization
ClosedPublic

Authored by Pierre-vh on Oct 4 2022, 5:09 AM.

Details

Summary

Previously we would be unable to legalize V2S16 BUILD_VECTOR_TRUNC on GFX8 & below as the custom legalization was missing.

Diff Detail

Event Timeline

Pierre-vh created this revision.Oct 4 2022, 5:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 5:09 AM
Pierre-vh requested review of this revision.Oct 4 2022, 5:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 5:09 AM
arsenm added inline comments.Oct 4 2022, 9:01 AM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
2901–2902

Src0 = B.buildTrunc(S16, ...).getReg(0)

llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-build-vector-trunc.mir
6

Should add a bonaire run line too

Pierre-vh updated this revision to Diff 465302.Oct 5 2022, 12:41 AM
Pierre-vh marked 2 inline comments as done.

Comments

nhaehnle removed a subscriber: nhaehnle.Oct 5 2022, 3:32 AM
arsenm accepted this revision.Oct 5 2022, 8:09 AM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
2904–2905

These asserts are redundant. The verifier or asserts in buildMerge would catch this being wrong

This revision is now accepted and ready to land.Oct 5 2022, 8:09 AM
This revision was landed with ongoing or failed builds.Oct 5 2022, 11:48 PM
This revision was automatically updated to reflect the committed changes.
Pierre-vh marked an inline comment as done.