This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix FP materialization/resolve with flat scratch
ClosedPublic

Authored by rampitec on Jan 22 2021, 1:57 PM.

Diff Detail

Event Timeline

rampitec created this revision.Jan 22 2021, 1:57 PM
rampitec requested review of this revision.Jan 22 2021, 1:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 22 2021, 1:57 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added inline comments.Jan 22 2021, 2:01 PM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
444

I don't think you can blindly set the register class, you should contrainRegClass instead

rampitec added inline comments.Jan 22 2021, 2:03 PM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
444

I cannot constrain VGPR to SGPR.

arsenm added inline comments.Jan 22 2021, 2:06 PM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
444

Oh, I see the API for this is just stupid. materializeFrameBaseRegister should just return the register it wants with the appropriate class. There's only the one caller, and there's no reason to have a randomly selected register class register as the input.

rampitec updated this revision to Diff 318667.Jan 22 2021, 3:31 PM
rampitec marked 2 inline comments as done.
arsenm accepted this revision.Jan 22 2021, 3:42 PM
This revision is now accepted and ready to land.Jan 22 2021, 3:42 PM