blob: 0484bc9f9dc96e1fdb98a4ed92ffc53f89e4f51a [file] [log] [blame]
Dinesh Dwivedi657105e2014-06-17 14:34:19 +00001; 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}