This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix isSGPRReg for special registers
ClosedPublic

Authored by critson on Sep 16 2022, 1:36 AM.

Details

Summary

Special registers, e.g. MODE, do not have register classes so
will cause null pointer exception if passed to isSGPRReg.

Diff Detail

Event Timeline

critson created this revision.Sep 16 2022, 1:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2022, 1:36 AM
critson requested review of this revision.Sep 16 2022, 1:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2022, 1:36 AM

What context is passing this through?

What context is passing this through?

I discovered this while writing a new hazard recognizer which need to check SGPR usage on all VALU instructions.

arsenm accepted this revision.Sep 16 2022, 10:55 AM
This revision is now accepted and ready to land.Sep 16 2022, 10:55 AM
This revision was landed with ongoing or failed builds.Sep 18 2022, 4:50 PM
This revision was automatically updated to reflect the committed changes.