1*cee313d2SEric Christopher; RUN: opt -jump-threading -verify-each -S -mtriple=x86_64-- -o - %s
2*cee313d2SEric Christopher
3*cee313d2SEric Christopherdefine void @foo() {
4*cee313d2SEric Christopherentry:
5*cee313d2SEric Christopher  br i1 false, label %A, label %B
6*cee313d2SEric Christopher
7*cee313d2SEric ChristopherA:
8*cee313d2SEric Christopher  %x = phi i32 [ undef, %entry ], [ %z, %B ]
9*cee313d2SEric Christopher  br label %B
10*cee313d2SEric Christopher
11*cee313d2SEric ChristopherB:
12*cee313d2SEric Christopher  %y = phi i32 [ undef, %entry ], [ %x, %A ]
13*cee313d2SEric Christopher  %z = add i32 %y, 1
14*cee313d2SEric Christopher  %cmp = icmp ne i32 %z, 0
15*cee313d2SEric Christopher  br i1 %cmp, label %exit, label %A
16*cee313d2SEric Christopher
17*cee313d2SEric Christopherexit:
18*cee313d2SEric Christopher  ret void
19*cee313d2SEric Christopher}
20