forked from OSchip/llvm-project
[LoopUnroll] Fix not-rotated.ll by adding back a limitation was unintentionally
removed in https://reviews.llvm.org/D80477
This commit is contained in:
parent
66e6b9afa8
commit
4e74541a92
|
@ -326,6 +326,11 @@ LoopUnrollResult llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI,
|
|||
"branch in latch or a single exiting block.\n");
|
||||
return LoopUnrollResult::Unmodified;
|
||||
}
|
||||
if (LatchBI->isConditional() && LatchBI != ExitingBI) {
|
||||
LLVM_DEBUG(
|
||||
dbgs() << "Can't unroll; a conditional latch must exit the loop");
|
||||
return LoopUnrollResult::Unmodified;
|
||||
}
|
||||
LLVM_DEBUG(dbgs() << " Exiting Block = " << ExitingBI->getParent()->getName()
|
||||
<< "\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue