This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Mark special registers as reserved
ClosedPublic

Authored by asavonic on Nov 2 2021, 5:21 AM.

Details

Summary

A reserved register:

  • is not allocatable
  • is considered always live
  • is ignored by liveness tracking

NVPTX special registers match the criteria, and marking them as
reserved helps to avoid machine verifier error:

*** Bad machine code: Using an undefined physical register ***
- function:    foo
- basic block: %bb.0  (0x557bb178b708)
- instruction: %0:int32regs = MOV_SPECIAL $envreg0
- operand 1:   $envreg0

Diff Detail

Event Timeline

asavonic created this revision.Nov 2 2021, 5:21 AM
asavonic requested review of this revision.Nov 2 2021, 5:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2021, 5:21 AM
tra accepted this revision.Nov 2 2021, 10:54 AM
This revision is now accepted and ready to land.Nov 2 2021, 10:54 AM
This revision was landed with ongoing or failed builds.Nov 3 2021, 5:49 AM
This revision was automatically updated to reflect the committed changes.