This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix implicit operands for ENTER_WWM pseudo
ClosedPublic

Authored by foad on Feb 11 2020, 11:22 AM.

Details

Summary

SIInstrInfo::expandPostRAPseudo converts ENTER_WWM in-place into an
S_OR_SAVEEXEC instruction that needs certain implicit operands. Without
this patch I get errors like this that make it harder to use -stop-after
to bisect the pass pipeline:

$ llc -march=amdgcn test/CodeGen/AMDGPU/wqm.ll -stop-after=postrapseudos -o - | sed -E 's/ (from|into) custom "TargetCustom[0-9]+"//' | llc -march=amdgcn -x=mir
error: <stdin>:1295:70: missing implicit register operand 'implicit-def $scc'

renamable $sgpr2_sgpr3 = S_OR_SAVEEXEC_B64 -1, implicit-def $exec
                                                                 ^

Note that this error is currently only generated by MIParser but it
comes with a FIXME comment:

// FIXME: Move the implicit operand verification to the machine verifier.

Diff Detail

Event Timeline

foad created this revision.Feb 11 2020, 11:22 AM
arsenm accepted this revision.Feb 11 2020, 11:36 AM
This revision is now accepted and ready to land.Feb 11 2020, 11:36 AM
This revision was automatically updated to reflect the committed changes.