xref: /llvm-project/llvm/test/Transforms/LoopUnroll/not-rotated.ll (revision 5103ef64fe4f60cc0fd518b514c712f4b4c03d98)
1; PR28103
2; Bail out if the two successors are not the header
3; and another bb outside of the loop. This case is not
4; properly handled by LoopUnroll, currently.
5
6; RUN: opt -passes=loop-unroll -verify-dom-info %s
7; REQUIRES: asserts
8
9define void @tinkywinky(i1 %patatino) {
10entry:
11  br label %header1
12header1:
13  %indvars.iv = phi i64 [ 1, %body2 ], [ 0, %entry ]
14  %exitcond = icmp ne i64 %indvars.iv, 1
15  br i1 %exitcond, label %body1, label %exit
16body1:
17  br i1 %patatino, label %body2, label %sink
18body2:
19  br i1 %patatino, label %header1, label %body3
20body3:
21  br label %sink
22sink:
23  br label %body2
24exit:
25  ret void
26}
27