diff options
| author | Michael Zolotukhin <mzolotukhin@apple.com> | 2018-01-09 23:54:35 +0000 |
|---|---|---|
| committer | Michael Zolotukhin <mzolotukhin@apple.com> | 2018-01-09 23:54:35 +0000 |
| commit | 1f562176e9363e5b8b47bbfd6ea3b5051902a46e (patch) | |
| tree | 7bd907a98798d85cf8a1241f44b00bdd9c857933 /llvm/lib | |
| parent | db2736ddd864925ddecf548b052464699445858f (diff) | |
| download | bcm5719-llvm-1f562176e9363e5b8b47bbfd6ea3b5051902a46e.tar.gz bcm5719-llvm-1f562176e9363e5b8b47bbfd6ea3b5051902a46e.zip | |
[LoopRotate] Detect loops with indirect branches better (we're giving up on them).
llvm-svn: 322137
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopRotation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp index a91f53ba663..0f35fccbe66 100644 --- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp +++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp @@ -268,7 +268,7 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) { // If the loop could not be converted to canonical form, it must have an // indirectbr in it, just give up. - if (!OrigPreheader) + if (!OrigPreheader || !L->hasDedicatedExits()) return false; // Anything ScalarEvolution may know about this loop or the PHI nodes |

