32 lines · plain
1; RUN: opt -debug-only=branch-prob -passes="require<branch-prob>,jump-threading" -S %s 2>&1 | FileCheck %s2; RUN: opt -debug-only=branch-prob -passes=jump-threading -S %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOBPI3; REQUIRES: asserts4 5; Make sure that we clear edge probabilities for bb1 as we fold6; the conditional branch in it.7 8; CHECK: eraseBlock bb19; CHECK-NOBPI-NOT: eraseBlock bb110 11define i32 @foo(i32 %arg) !prof !0 {12; CHECK-LABEL: @foo13 %cond1 = icmp eq i32 %arg, 4214 br i1 %cond1, label %bb1, label %bb215 16bb2:17 ret i32 218 19bb1:20 %cond2 = icmp eq i32 %arg, 4221 br i1 %cond2, label %bb3, label %bb422 23bb3:24 ret i32 325 26bb4:27; CHECK-NOT: bb4:28 ret i32 429}30 31!0 = !{!"function_entry_count", i64 0}32