LoopDeletion depends on loops having dedicated exits.

llvm-svn: 86180
This commit is contained in:
Dan Gohman 2009-11-05 21:47:04 +00:00
parent f65735f0c5
commit 6a3eefbfeb

View File

@ -115,6 +115,10 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
if (!preheader)
return false;
// If LoopSimplify form is not available, stay out of trouble.
if (!L->hasDedicatedExits())
return false;
// We can't remove loops that contain subloops. If the subloops were dead,
// they would already have been removed in earlier executions of this pass.
if (L->begin() != L->end())