This is an archive of the discontinued LLVM Phabricator instance.

[Local] Prevent potential DT assert on insertEdge
AbandonedPublic

Authored by brzycki on Sep 28 2017, 3:07 PM.

Details

Reviewers
kuhar
dberlin
Summary

There exists a corner-case for function TryToSimplifyUncondBranchFromEmptyBlock() in Local.cpp where it's posible to
pass:

DT->insertEdge(BB, BB);

to the dominator tree subsystem. When this happens the DT code (correctly) asserts since a block cannot dominate itself.

The error was discovered when inspecting the code for D37528 .

Diff Detail

Repository
rL LLVM

Event Timeline

brzycki created this revision.Sep 28 2017, 3:07 PM
kuhar accepted this revision.Sep 28 2017, 3:14 PM
This revision is now accepted and ready to land.Sep 28 2017, 3:14 PM
brzycki retitled this revision from Prevent potential DT assert on insertEdge to [Local] Prevent potential DT assert on insertEdge.Sep 29 2017, 7:30 AM
brzycki abandoned this revision.Oct 4 2017, 12:58 PM

Fixed in patch re-try found in D38558.