This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GISel] Smaller code for scalar 32 to 64-bit extensions
ClosedPublic

Authored by foad on Aug 6 2021, 5:18 AM.

Diff Detail

Event Timeline

foad created this revision.Aug 6 2021, 5:18 AM
foad requested review of this revision.Aug 6 2021, 5:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2021, 5:18 AM
arsenm added a comment.Aug 6 2021, 6:00 AM

I thought these got up split before selection

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
2274

s/0/AMDGPU::NoSubRegister

2275

Braces

2279

Braces

foad updated this revision to Diff 364772.Aug 6 2021, 6:14 AM

Add braces, use NoSubRegister.

foad added a comment.Aug 6 2021, 6:15 AM

I thought these got up split before selection

There is code in AMDGPURegisterBankInfo::applyMappingImpl to do that for VALU, but not for SALU. Would it be better to do it there for SALU too?

arsenm added a comment.Aug 6 2021, 8:27 AM

I thought these got up split before selection

There is code in AMDGPURegisterBankInfo::applyMappingImpl to do that for VALU, but not for SALU. Would it be better to do it there for SALU too?

Maybe this should just be a post-regbankselect combine. We don't want to have any other combines that need to create extensions to worry about this too

reverse ping

Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2022, 1:41 PM
Herald added a subscriber: kosarev. · View Herald Transcript
foad added a comment.Nov 14 2022, 2:21 AM

Do you still think this should be done as a post-regbankselect combine instead? I really have no idea.

foad updated this revision to Diff 475087.Nov 14 2022, 2:25 AM

Rebase.

Do you still think this should be done as a post-regbankselect combine instead? I really have no idea.

I do think that could potentially enable other combines, but I'm not sure it needs to be exclusionary to also doing it in selection

foad added a comment.Nov 15 2022, 1:47 AM

Then I'm just waiting for review. Ping.

arsenm accepted this revision.Nov 15 2022, 4:32 PM
This revision is now accepted and ready to land.Nov 15 2022, 4:32 PM
This revision was landed with ongoing or failed builds.Nov 15 2022, 11:10 PM
This revision was automatically updated to reflect the committed changes.