projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76e51a8
)
Minor tweak
author
Chris Lattner
<sabre@nondot.org>
Sun, 29 Sep 2002 22:59:29 +0000
(22:59 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 29 Sep 2002 22:59:29 +0000
(22:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3985
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/LoopInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/LoopInfo.cpp
b/lib/Analysis/LoopInfo.cpp
index 1c3d5ee5658a1ec4137d77026aeb870b07e5ce74..1f8e34ca7e6f712e757d950802989c3aa0aa9dae 100644
(file)
--- a/
lib/Analysis/LoopInfo.cpp
+++ b/
lib/Analysis/LoopInfo.cpp
@@
-147,8
+147,9
@@
BasicBlock *Loop::getLoopPreheader() const {
BasicBlock *Header = getHeader();
for (pred_iterator PI = pred_begin(Header), PE = pred_end(Header);
PI != PE; ++PI)
- if (!contains(*PI)) { // If the block is not in the loop...
- if (Out) return 0; // Multiple predecessors outside the loop
+ if (!contains(*PI)) { // If the block is not in the loop...
+ if (Out && Out != *PI)
+ return 0; // Multiple predecessors outside the loop
Out = *PI;
}