1; RUN: opt < %s -reassociate -disable-output
2; PR13041
3
4define void @foo() {
5entry:
6  br label %while.cond
7
8while.cond:                                       ; preds = %while.body, %entry
9  %b.0 = phi i32 [ undef, %entry ], [ %sub2, %while.body ]
10  %c.0 = phi i32 [ undef, %entry ], [ %sub3, %while.body ]
11  br i1 undef, label %while.end, label %while.body
12
13while.body:                                       ; preds = %while.cond
14  %sub = sub nsw i32 0, %b.0
15  %sub2 = sub nsw i32 %sub, %c.0
16  %sub3 = sub nsw i32 0, %c.0
17  br label %while.cond
18
19while.end:                                        ; preds = %while.cond
20  ret void
21}
22