1; RUN: opt -S -jump-threading < %s | FileCheck %s
2
3; CHECK-LABEL: @f(
4; CHECK-LABEL: entry
5; CHECK: ret void
6; CHECK-NOT: for.cond1
7; CHECK-NOT: for.body
8
9define void @f() {
10entry:
11  ret void
12
13for.cond1:
14  %i.025 = phi i32 [ %inc, %for.body ], [ %inc, %for.body ], [ 1, %for.cond1 ]
15  %cmp = icmp slt i32 %i.025, 2
16  br i1 %cmp, label %for.body, label %for.cond1
17
18for.body:
19  %inc = add nsw i32 %i.025, 0
20  %a = icmp ugt i32 %inc, 2
21  br i1 %a, label %for.cond1, label %for.cond1
22}
23