30 lines · plain
1; RUN: opt -passes=jump-threading -S < %s | FileCheck %s2 3; Check that all zero branch weights do not cause a crash.4define void @zero_branch_weights(i32 %tmp, i32 %tmp3) {5bb:6 %tmp1 = icmp eq i32 %tmp, 17 br i1 %tmp1, label %bb5, label %bb28; CHECK-NOT: br i1 %tmp1,{{.*}} !prof9 10bb2:11 %tmp4 = icmp ne i32 %tmp3, 112 br label %bb513; CHECK: br i1 %tmp4, {{.*}} !prof ![[PROF:[0-9]+]]14 15bb5:16 %tmp6 = phi i1 [ false, %bb ], [ %tmp4, %bb2 ]17 br i1 %tmp6, label %bb8, label %bb7, !prof !{!"branch_weights", i32 0, i32 0}18 19bb7:20 br label %bb921 22bb8:23 br label %bb924 25bb9:26 ret void27}28 29;CHECK: ![[PROF]] = !{!"branch_weights", i32 -2147483648, i32 0}30