This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Add AGPR bank and RegBankSelect mfma intrinsics
ClosedPublic

Authored by kerbowa on Nov 30 2019, 1:40 PM.

Event Timeline

kerbowa created this revision.Nov 30 2019, 1:40 PM

You may be able to re-use the existing DAG select tests at this point?

llvm/lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.def
35

I think a 96 bit one is needed for symmetry to legalize all the vector operations

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
176

Indented too much, and no else after return

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h
139

This can be static

arsenm added inline comments.Nov 30 2019, 9:39 PM
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
119

I think the cost actually needs to go up if src and dst are AGPRs since there is no direct copy between them

kerbowa updated this revision to Diff 231623.Dec 1 2019, 1:19 PM

Address comments.

kerbowa marked 4 inline comments as done.Dec 1 2019, 1:21 PM

You may be able to re-use the existing DAG select tests at this point?

We need to work on legalizing/selecting wide stores first.

arsenm added inline comments.Dec 1 2019, 9:13 PM
llvm/lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.def
36

This is going to cause an annoying merge conflict with one of my patches. It would be nice to start finally having tablegen emit this

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
143–144

Should just directly check if they are AGPR. This incorrectly covers VGPR copies?

2125

Extra newline

kerbowa updated this revision to Diff 231637.Dec 1 2019, 9:35 PM

Fix AGPR to AGPR copy cost.

arsenm accepted this revision.Dec 1 2019, 9:44 PM

LGTM

This revision is now accepted and ready to land.Dec 1 2019, 9:44 PM
kerbowa updated this revision to Diff 231639.Dec 1 2019, 9:49 PM
kerbowa marked 2 inline comments as done.

Fix potential merge conflict.

LGTM, I don't think it's avoidable since the renumbering of the hardcoded indexes is the painful part

This revision was automatically updated to reflect the committed changes.
kerbowa marked an inline comment as done.