1 ; RUN: opt -passes=pgo-instr-gen -S 2>&1 < %s | FileCheck %s
3 ; RUN: llvm-profdata merge %S/Inputs/callbr.proftext -o %t.profdata
4 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
9 ; CHECK-NOT: ptrtoint ptr asm sideeffect
10 ; CHECK: callbr void asm sideeffect
11 %retval = alloca i32, align 4
12 callbr void asm sideeffect "", "!i,~{dirflag},~{fpsr},~{flags}"() #1
13 to label %asm.fallthrough [label %b]
19 %0 = load i32, ptr %retval, align 4
23 ; USE-SAME: !prof ![[BW_ENTRY:[0-9]+]]
24 ; USE: callbr void asm sideeffect
26 ; USE-SAME: !prof ![[BW_CALLBR:[0-9]+]]
27 ; USE ![[BW_ENTRY]] = !{!"function_entry_count", i64 100}
28 ; USE ![[BW_CALLBR]] = !{!"branch_weights", i32 80, i32 20}