This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix isReallyTriviallyReMaterializable for V_MOV_*
ClosedPublic

Authored by foad on Mar 10 2021, 6:49 AM.

Details

Summary

D57708 changed SIInstrInfo::isReallyTriviallyReMaterializable to reject
V_MOVs with extra implicit operands, but it accidentally rejected all
V_MOVs because of their implicit use of exec. Fix it but avoid adding a
moderately expensive call to MI.getDesc().getNumImplicitUses().

In real graphics shaders this changes quite a few vgpr copies into move-
immediates, which is good for avoiding stalls on GFX10.

Diff Detail

Event Timeline

foad created this revision.Mar 10 2021, 6:49 AM
foad requested review of this revision.Mar 10 2021, 6:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2021, 6:49 AM
rampitec accepted this revision.Mar 10 2021, 7:39 AM
This revision is now accepted and ready to land.Mar 10 2021, 7:39 AM
This revision was landed with ongoing or failed builds.Mar 10 2021, 8:21 AM
This revision was automatically updated to reflect the committed changes.