This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix liveness verifier error in hazard recognizer
ClosedPublic

Authored by rampitec on Sep 7 2022, 3:33 PM.

Details

Summary

After D133067 we are inserting swaps to use a new physical
register. I have noticed verifier errors about undefined
physical register uses if we are tracking liveness post RA.

We have no access to LIS at this point, so mark new register
uses as undef to calm down the verifier. Liveness should not
matter at this point anyway.

Note the description of the RegState::Undef: "Value of the
register doesn't matter." I.e. it does not say it is strictly
undefined. In fact that is what we really need: this value
does not matter.

I also had to modify the test a bit since with tracking enabled
it does not pass verification even before the recognizer.

Diff Detail

Event Timeline

rampitec created this revision.Sep 7 2022, 3:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2022, 3:33 PM
rampitec requested review of this revision.Sep 7 2022, 3:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2022, 3:33 PM
Herald added a subscriber: wdng. · View Herald Transcript
kerbowa accepted this revision.Sep 7 2022, 4:14 PM

LGTM

This revision is now accepted and ready to land.Sep 7 2022, 4:14 PM
This revision was landed with ongoing or failed builds.Sep 7 2022, 4:30 PM
This revision was automatically updated to reflect the committed changes.