This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Control flow pseudos are not part of block prologue
AbandonedPublic

Authored by critson on Mar 8 2022, 6:55 PM.

Details

Reviewers
rampitec
ruiling
Summary

We should not consider SI control flow pseudo instructions part
of the block prologue, despite them modifying EXEC.

This is a follow up to D119399.

Diff Detail

Event Timeline

critson created this revision.Mar 8 2022, 6:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 6:55 PM
critson requested review of this revision.Mar 8 2022, 6:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 6:55 PM
ruiling added inline comments.Mar 8 2022, 7:37 PM
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
7604

I think SI_IF_BREAK can be removed from the list as it does not modifies EXEC. SI_END_CF should be removed from the list, as SI_END_CF means the join point, we should treat it as block prologue. Other instructions should never be prologue instructions, so it is correct to list them here.

I need to rewrite the test.

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
7604

Agree, I think with your suggest this patch is correct.
Although it was not the root cause of the bug I am chasing.

critson abandoned this revision.Mar 9 2022, 4:00 AM

This is unnecessary, the remaining pseudo instructions are terminators so already skipped.