This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Make s16 phi legal
ClosedPublic

Authored by arsenm on Aug 4 2020, 7:50 PM.

Details

Summary

If we were to have an operation with an s16 def that needs to be
executed in a waterfall loop, not having s16 legal would place an
avoidable burden on RegBankSelect to widen it.

Diff Detail

Event Timeline

arsenm created this revision.Aug 4 2020, 7:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2020, 7:50 PM
arsenm requested review of this revision.Aug 4 2020, 7:50 PM
foad accepted this revision.Aug 6 2020, 1:56 AM

I don't know if I understand all the impliciations, but the diffs look fine to me.

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

It doesn't really matter but this seems like an odd place to insert "S16" into the list.

This revision is now accepted and ready to land.Aug 6 2020, 1:56 AM
arsenm added inline comments.Aug 6 2020, 6:41 AM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
446

This should probably be replaced with legalIf(isRegisterType(0)) but I'm planning a larger rewrite of all of this stuff