This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GlobalISel] Revise handling of wide loads in RegBankSelect
ClosedPublic

Authored by kerbowa on Mar 3 2020, 10:53 AM.

Details

Summary

When splitting loads in RegBankSelect G_EXTRACT_VECTOR_ELT were being added
which could not be selected. Since invoking the legalizer will generate
instructions that split and combine wide loads, we can remove the redundant
repair instructions which are added by RegBankSelect.

Diff Detail

Event Timeline

kerbowa created this revision.Mar 3 2020, 10:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2020, 10:53 AM
arsenm added inline comments.Mar 3 2020, 2:30 PM
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
1153

How does this ensure the correct result register is used? I thought this trying to infer what intermediate operations were introduced was fragile. Can we just not report the breakdown and directly handle the split, so we never have the unneeded instruction?

kerbowa updated this revision to Diff 261730.May 3 2020, 6:42 PM

Don't report breakdown for wide load results.

arsenm accepted this revision.May 11 2020, 3:21 PM

LGTM

This revision is now accepted and ready to land.May 11 2020, 3:21 PM
This revision was automatically updated to reflect the committed changes.