This is an archive of the discontinued LLVM Phabricator instance.

[amdgpu] Fix a crash case when preserving MDT in SILowerControlFlow
ClosedPublic

Authored by hliao on Oct 14 2021, 1:15 PM.

Details

Summary
  • When a redundant MBB is being erased from MDT, check whether its single successor is dominiated by it. If yes, update that successor's idom before erasing MBB; otherwise, it implies MBB is a leaf node and could be erased directly.

Diff Detail

Event Timeline

hliao created this revision.Oct 14 2021, 1:15 PM
hliao requested review of this revision.Oct 14 2021, 1:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2021, 1:15 PM
hliao updated this revision to Diff 379817.Oct 14 2021, 1:21 PM

Fix typo.

hliao updated this revision to Diff 379818.Oct 14 2021, 1:22 PM

Revise the comment.

hliao updated this revision to Diff 379821.Oct 14 2021, 1:28 PM

Remove '!llvm.ident' in that test triggering crash.

foad accepted this revision.Oct 15 2021, 1:54 AM

LGTM, thank you!

This revision is now accepted and ready to land.Oct 15 2021, 1:54 AM
This revision was landed with ongoing or failed builds.Oct 15 2021, 10:22 AM
This revision was automatically updated to reflect the committed changes.