diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-11 07:47:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-11 07:47:59 +0000 |
commit | 63fe78de68c23135acc1888b337221812ca76e56 (patch) | |
tree | 963c6a2bfc2938913d8c7942be61949d98db21ab /llvm/lib/Transforms/Scalar | |
parent | 23109cb319da7fab604c3f76eae0869c8045dae7 (diff) | |
download | bcm5719-llvm-63fe78de68c23135acc1888b337221812ca76e56.tar.gz bcm5719-llvm-63fe78de68c23135acc1888b337221812ca76e56.zip |
remove a bogus assertion: the latch block of a loop is not
neccesarily an uncond branch to the header. This fixes
PR8955 (the assertion tripping).
llvm-svn: 123219
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopRotation.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp index d1c975f2e99..3bc4b1d2f1c 100644 --- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp +++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp @@ -335,12 +335,11 @@ bool LoopRotate::rotateLoop(Loop *L) { assert(L->getLoopPreheader() && "Invalid loop preheader after loop rotation"); assert(L->getLoopLatch() && "Invalid loop latch after loop rotation"); - // Now that the CFG and DomTree are in a consistent state again, merge the - // OrigHeader block into OrigLatch. We know that they are joined by an - // unconditional branch. This is just a cleanup so the emitted code isn't - // too gross. - bool DidIt = MergeBlockIntoPredecessor(OrigHeader, this); - assert(DidIt && "Block merge failed??"); (void)DidIt; + // Now that the CFG and DomTree are in a consistent state again, try to merge + // the OrigHeader block into OrigLatch. This will succeed if they are + // connected by an unconditional branch. This is just a cleanup so the + // emitted code isn't too gross in this common case. + MergeBlockIntoPredecessor(OrigHeader, this); ++NumRotated; return true; |