mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
69ccadd753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
574 B
LLVM
28 lines
574 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: llvm-upgrade < %s | llvm-as | opt -analyze -loops | grep ' Loop Containing:[ ]*%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
|
|
}
|