1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 00:12:50 +01:00
llvm-mirror/test/Other/2003-02-19-LoopInfoNestingBug.ll
Dan Gohman 205b641954 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.

llvm-svn: 81537
2009-09-11 18:01:28 +00:00

30 lines
808 B
LLVM

; 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: opt < %s -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
}