1; LoopInfo is incorrectly calculating loop nesting! In this case it doesn't 2; figure out that loop "Inner" should be nested inside of leep "LoopHeader", 3; and instead nests it just inside loop "Top" 4; 5; RUN: opt < %s -analyze -loops | \ 6; RUN: grep { Loop at depth 3 containing: %Inner<header><latch><exiting>} 7; 8define void @test() { 9 br label %Top 10 11Top: ; preds = %Out, %0 12 br label %LoopHeader 13 14Next: ; preds = %LoopHeader 15 br i1 false, label %Inner, label %Out 16 17Inner: ; preds = %Inner, %Next 18 br i1 false, label %Inner, label %LoopHeader 19 20LoopHeader: ; preds = %Inner, %Top 21 br label %Next 22 23Out: ; preds = %Next 24 br i1 false, label %Top, label %Done 25 26Done: ; preds = %Out 27 ret void 28} 29 30