blob: 35d9fdec42816825b4b3281e249ab7df760e533d [file] [log] [blame]
Nick Lewycky3b739d22011-02-10 23:54:10 +00001; RUN: opt -jump-threading -disable-output %s
2; PR9112
3
4; This is actually a test for value tracking. Jump threading produces
5; "%phi = phi i16" when it removes all edges leading to %unreachable.
6; The .ll parser won't let us write that directly since it's invalid code.
7
8define void @func() nounwind {
9entry:
10 br label %bb
11
12bb:
13 br label %bb
14
15unreachable:
16 %phi = phi i16 [ %add, %unreachable ], [ 0, %next ]
17 %add = add i16 0, %phi
18 %cmp = icmp slt i16 %phi, 0
19 br i1 %cmp, label %unreachable, label %next
20
21next:
22 br label %unreachable
23}
24