1*cee313d2SEric Christopher; RUN: opt -S -jump-threading -verify -o - %s | FileCheck %s
2*cee313d2SEric Christopher@a = external global i16, align 1
3*cee313d2SEric Christopher
4*cee313d2SEric Christopher; CHECK-LABEL: f
5*cee313d2SEric Christopher; CHECK: bb6:
6*cee313d2SEric Christopher; CHECK: bb2:
7*cee313d2SEric Christopher; CHECK: bb3:
8*cee313d2SEric Christopher; CHECK-NOT: bb0:
9*cee313d2SEric Christopher; CHECK-NOT: bb1:
10*cee313d2SEric Christopher; CHECK-NOT: bb4:
11*cee313d2SEric Christopher; CHECK-NOT: bb5:
12*cee313d2SEric Christopherdefine void @f(i32 %p1) {
13*cee313d2SEric Christopherbb0:
14*cee313d2SEric Christopher  %0 = icmp eq i32 %p1, 0
15*cee313d2SEric Christopher  br i1 undef, label %bb6, label %bb1
16*cee313d2SEric Christopher
17*cee313d2SEric Christopherbb1:
18*cee313d2SEric Christopher  br label %bb2
19*cee313d2SEric Christopher
20*cee313d2SEric Christopherbb2:
21*cee313d2SEric Christopher  %1 = phi i1 [ %0, %bb1 ], [ %2, %bb4 ]
22*cee313d2SEric Christopher  %2 = and i1 %1, undef
23*cee313d2SEric Christopher  br i1 %2, label %bb3, label %bb4
24*cee313d2SEric Christopher
25*cee313d2SEric Christopherbb3:
26*cee313d2SEric Christopher  store i16 undef, i16* @a, align 1
27*cee313d2SEric Christopher  br label %bb4
28*cee313d2SEric Christopher
29*cee313d2SEric Christopherbb4:
30*cee313d2SEric Christopher  br i1 %0, label %bb2, label %bb5
31*cee313d2SEric Christopher
32*cee313d2SEric Christopherbb5:
33*cee313d2SEric Christopher  unreachable
34*cee313d2SEric Christopher
35*cee313d2SEric Christopherbb6:
36*cee313d2SEric Christopher  ret void
37*cee313d2SEric Christopher}
38