; LoopInfo is incorrectly calculating loop nesting!  In this case it doesn't 
; figure out that loop "Inner" should be nested inside of leep "LoopHeader", 
; and instead nests it just inside loop "Top"
;
; RUN: llvm-as < %s | opt -analyze -loops | \
; RUN:   grep {     Loop Containing:\[ \]*%Inner}
;
define void @test() {
        br label %Top

Top:            ; preds = %Out, %0
        br label %LoopHeader

Next:           ; preds = %LoopHeader
        br i1 false, label %Inner, label %Out

Inner:          ; preds = %Inner, %Next
        br i1 false, label %Inner, label %LoopHeader

LoopHeader:             ; preds = %Inner, %Top
        br label %Next

Out:            ; preds = %Next
        br i1 false, label %Top, label %Done

Done:           ; preds = %Out
        ret void
}


; LoopInfo is incorrectly calculating loop nesting!  In this case it doesn't 
; figure out that loop "Inner" should be nested inside of leep "LoopHeader", 
; and instead nests it just inside loop "Top"
;
; RUN: llvm-as < %s | opt -analyze -loops | \
; RUN:   grep {     Loop at depth 3 containing: %Inner<header><latch><exit>}
;
define void @test() {
        br label %Top

Top:            ; preds = %Out, %0
        br label %LoopHeader

Next:           ; preds = %LoopHeader
        br i1 false, label %Inner, label %Out

Inner:          ; preds = %Inner, %Next
        br i1 false, label %Inner, label %LoopHeader

LoopHeader:             ; preds = %Inner, %Top
        br label %Next

Out:            ; preds = %Next
        br i1 false, label %Top, label %Done

Done:           ; preds = %Out
        ret void
}


Update another test for the LoopInfo::print changes.
Update another test for the LoopInfo::print changes.


git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@65598 91177308-0d34-0410-b5e6-96231b3b80d8
