blob: b4b88e096079cf5ff8199eb5a0c4fa996e7a1a47 [file] [log] [blame]
Davide Italiano0f62eea2017-04-24 20:14:11 +00001; 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 -loop-unroll -verify-dom-info %s
Davide Italianocc7257c2017-05-12 15:30:58 +00007; REQUIRES: asserts
Davide Italiano0f62eea2017-04-24 20:14:11 +00008
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}