This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Turn off pass to rewrite partially used virtual superregisters after RenameIndependentSubregs pass with registers of minimal size.
ClosedPublic

Authored by vpykhtin on Jun 6 2023, 11:11 AM.

Details

Summary

There is a failure with this pass in the case when target register class for a subregister isn't known from instruction description (for ex. COPY).
Currently in this situation the RC is obtained using TargetRegisterInfo::getSubRegisterClass but in general it's not working.

In order to fix this two things should be done:

  1. Stop processing a subregister if the target register class is unknown (conservative approach)
  2. Improve deduction of subregister' target register class (i.e by processing COPY chain)

I was going to implement point 1 but my tests use implicit operands for S_NOP and they don't have associated target register class and all tests fail.
Therefore I decided to turn off the pass now, implement point 1 and fix my tests.

Diff Detail

Event Timeline

vpykhtin created this revision.Jun 6 2023, 11:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 11:11 AM
vpykhtin requested review of this revision.Jun 6 2023, 11:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 11:11 AM
vpykhtin added a reviewer: Restricted Project.Jun 6 2023, 11:11 AM
arsenm accepted this revision.Jun 6 2023, 1:33 PM
This revision is now accepted and ready to land.Jun 6 2023, 1:33 PM
vpykhtin updated this revision to Diff 529213.Jun 7 2023, 1:31 AM

Fixed llc-pipeline test, rebased.

This revision was landed with ongoing or failed builds.Jun 7 2023, 3:05 AM
This revision was automatically updated to reflect the committed changes.