blob: ebad6baa371d20888dc6e590a9c5bd4ca334b90b [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; 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: llvm-upgrade < %s | llvm-as | opt -analyze -loops | \
6; RUN: grep { Loop Containing:\[ \]*%Inner}
7;
8
9implementation
10
11void %test() {
12 br label %Top
13Top:
14 br label %LoopHeader
15Next:
16 br bool false, label %Inner, label %Out
17Inner:
18 br bool false, label %Inner, label %LoopHeader
19
20LoopHeader:
21 br label %Next
22
23Out:
24 br bool false, label %Top, label %Done
25
26Done:
27 ret void
28}