diff options
author | Dan Gohman <gohman@apple.com> | 2009-11-05 21:47:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-11-05 21:47:04 +0000 |
commit | dca7ac335b1432091a3f11155c78855ffa920768 (patch) | |
tree | 324c5e0bb7b39725c559481990dfe504f0b397a8 /llvm/lib/Transforms | |
parent | e4a8c64731a22a505a28ba9410146588c98ef21b (diff) | |
download | bcm5719-llvm-dca7ac335b1432091a3f11155c78855ffa920768.tar.gz bcm5719-llvm-dca7ac335b1432091a3f11155c78855ffa920768.zip |
LoopDeletion depends on loops having dedicated exits.
llvm-svn: 86180
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopDeletion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp index 866d8b41d9d..48817ab9d5a 100644 --- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp @@ -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()) |