brintos

brintos / llvm-project-archived public Read only

0
0
Text · 838 B · c651fcb Raw
30 lines · plain
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 -passes='print<loops>' -disable-output 2>&1 | FileCheck %s6 7; CHECK:  Loop at depth 3 containing: %Inner<header><latch><exiting>8define void @test() {9        br label %Top10 11Top:            ; preds = %Out, %012        br label %LoopHeader13 14Next:           ; preds = %LoopHeader15        br i1 false, label %Inner, label %Out16 17Inner:          ; preds = %Inner, %Next18        br i1 false, label %Inner, label %LoopHeader19 20LoopHeader:             ; preds = %Inner, %Top21        br label %Next22 23Out:            ; preds = %Next24        br i1 false, label %Top, label %Done25 26Done:           ; preds = %Out27        ret void28}29 30