1 ; RUN: opt -passes=jump-threading -S < %s | FileCheck %s
3 ; Check that all zero branch weights do not cause a crash.
4 define void @zero_branch_weights(i32 %tmp, i32 %tmp3) {
6 %tmp1 = icmp eq i32 %tmp, 1
7 br i1 %tmp1, label %bb5, label %bb2
8 ; CHECK-NOT: br i1 %tmp1,{{.*}} !prof
11 %tmp4 = icmp ne i32 %tmp3, 1
13 ; CHECK: br i1 %tmp4, {{.*}} !prof ![[PROF:[0-9]+]]
16 %tmp6 = phi i1 [ false, %bb ], [ %tmp4, %bb2 ]
17 br i1 %tmp6, label %bb8, label %bb7, !prof !{!"branch_weights", i32 0, i32 0}
29 ;CHECK: ![[PROF]] = !{!"branch_weights", i32 -2147483648, i32 0}