diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-20 00:09:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-20 00:09:26 +0000 |
commit | e9d0070e18bdec101159b3a344c83df777f8f88b (patch) | |
tree | 3074886162ae2462857014fa6a2f3e476fac4d97 | |
parent | 65a3f17097ecd92265fc5e7248a5216999a76bfa (diff) |
Add a testcase for broken loopinfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5602 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Other/2003-02-19-LoopInfoNestingBug.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Other/2003-02-19-LoopInfoNestingBug.ll b/test/Other/2003-02-19-LoopInfoNestingBug.ll new file mode 100644 index 0000000000..78338b8e6f --- /dev/null +++ b/test/Other/2003-02-19-LoopInfoNestingBug.ll @@ -0,0 +1,27 @@ +; 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: analyze -loops %s | grep ' Loop Containing: label %Inner' +; + +implementation + +void %test() { + br label %Top +Top: + br label %LoopHeader +Next: + br bool false, label %Inner, label %Out +Inner: + br bool false, label %Inner, label %LoopHeader + +LoopHeader: + br label %Next + +Out: + br bool false, label %Top, label %Done + +Done: + ret void +} |