This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Basic implementation of isExtractSubvectorCheap
ClosedPublic

Authored by foad on Jun 9 2022, 2:12 AM.

Details

Summary

Add a basic implementation of isExtractSubvectorCheap that only
considers extracts at offset 0.

Diff Detail

Event Timeline

foad created this revision.Jun 9 2022, 2:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2022, 2:12 AM
foad requested review of this revision.Jun 9 2022, 2:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2022, 2:12 AM
foad added a comment.Jun 9 2022, 2:13 AM

This doesn't affect any current lit tests but does fix a code quality regression in D127115.

foad added inline comments.
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
1589

For VGPRs I think any extract starting at a dword boundary should be cheap, but for SGPRs it would need to start at a suitably aligned register number. So I don't know how to implement this.

deadalnix accepted this revision.Jun 9 2022, 7:08 AM
deadalnix added a subscriber: deadalnix.

I can confirm that this works.

This revision is now accepted and ready to land.Jun 9 2022, 7:08 AM

@foad do you have commit rights? Do you need me to push this for you?

This revision was landed with ongoing or failed builds.Jun 10 2022, 6:43 AM
This revision was automatically updated to reflect the committed changes.
foad added a comment.Jun 10 2022, 6:44 AM

@foad do you have commit rights? Do you need me to push this for you?

Yes. No. I was just waiting for further comments.