This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Only remove branches in SIInstrInfo::removeBranch
ClosedPublic

Authored by critson on Oct 5 2021, 2:01 AM.

Details

Summary

Without this change _term instructions can be removed during
critical edge splitting.

Diff Detail

Unit TestsFailed

Event Timeline

critson created this revision.Oct 5 2021, 2:01 AM
critson requested review of this revision.Oct 5 2021, 2:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 2:01 AM
critson updated this revision to Diff 377122.Oct 5 2021, 2:15 AM

Rebase on top of pre-committed test.

foad accepted this revision.Oct 5 2021, 2:31 AM

LGTM, given that it matches similar logic in analyzeBranch.

As a further cleanup maybe both analyzeBranch and removeBranch should stop using getFirstTerminator, and instead just look for one or two branch instructions right at the end of MBB?

This revision is now accepted and ready to land.Oct 5 2021, 2:31 AM
This revision was landed with ongoing or failed builds.Oct 5 2021, 6:34 PM
This revision was automatically updated to reflect the committed changes.