This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Implement fewerElementsVector for G_SEXT_INREG
ClosedPublic

Authored by arsenm on Jan 13 2020, 5:42 AM.

Details

Summary

Start using a new strategy with a combination of merge and unmerges.

This allows scalarizing before lowering, which in cases like
<2 x s128> avoids producing giant illegal shifts.

Diff Detail

Event Timeline

arsenm created this revision.Jan 13 2020, 5:42 AM
aemerson accepted this revision.Feb 3 2020, 9:58 AM

It's a real struggle for me to review AMDGPU legalizer changes sometimes. I wish we had smaller, more obvious for the change being made.

llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract-vector-elt.mir
209

Why did this test change?

This revision is now accepted and ready to land.Feb 3 2020, 9:58 AM
arsenm marked an inline comment as done.Feb 3 2020, 10:13 AM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract-vector-elt.mir
209

This is just an instruction reordering since the legalization steps now happen in a different order. Before it lowered to vector shifts before scalarizing