This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix WMM Entry SCC preservation
ClosedPublic

Authored by critson on Jan 26 2021, 8:20 PM.

Details

Summary

SCC was not correctly preserved when entering WWM.
Current lit test was unable to detect this as entry block is
handled differently.
Additionally fix an issue where SCC was unnecessarily preserved
when exiting from WWM to Exact mode.

Diff Detail

Event Timeline

critson created this revision.Jan 26 2021, 8:20 PM
critson requested review of this revision.Jan 26 2021, 8:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2021, 8:20 PM
foad added inline comments.Jan 27 2021, 2:58 AM
llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
843

// for comments please.

847

All three SaveSCC = calculations could do with an explanatory comment.

856

llvm_unreachable

llvm/test/CodeGen/AMDGPU/wqm.mir
63

Remove most of this? Usually you only need name, tracksRegLiveness and body.

critson marked 4 inline comments as done.Jan 27 2021, 8:29 PM
critson added inline comments.
llvm/test/CodeGen/AMDGPU/wqm.mir
63

registers are needed if types are not embedded.
I have switch the new test to embedded types.

critson updated this revision to Diff 319747.Jan 27 2021, 8:29 PM
critson marked an inline comment as done.

Address comments.

foad accepted this revision.Jan 28 2021, 7:53 AM

Looks good.

This revision is now accepted and ready to land.Jan 28 2021, 7:53 AM
This revision was landed with ongoing or failed builds.Jan 28 2021, 5:06 PM
This revision was automatically updated to reflect the committed changes.