xref: /llvm-project/llvm/test/Transforms/SampleProfile/pseudo-probe-slotindex.ll (revision 0271ae65a66367d802fa6866599d11e35f68450f)
1; REQUIRES: x86_64-linux
2; RUN: llc -print-after=slotindexes -stop-after=slotindexes -mtriple=x86_64-- %s -filetype=asm -o %t 2>&1 | FileCheck %s
3
4define void @foo(ptr %p) {
5  store i32 0, ptr %p
6  call void @llvm.pseudoprobe(i64 5116412291814990879, i64 1, i32 0, i64 -1)
7  store i32 0, ptr %p
8  ret void
9}
10
11;; Check the pseudo probe instruction isn't assigned a slot index.
12;CHECK: IR Dump {{.*}}
13;CHECK: # Machine code for function foo{{.*}}
14;CHECK: {{[0-9]+}}B  bb.0 (%ir-block.0)
15;CHECK: {{[0-9]+}}B	 %0:gr64 = COPY killed $rdi
16;CHECK: {{^}}        PSEUDO_PROBE 5116412291814990879
17;CHECK: {{[0-9]+}}B	 MOV32mi
18;CHECK: {{[0-9]+}}B	 RET 0
19
20declare void @llvm.pseudoprobe(i64, i64, i32, i64) #0
21
22attributes #0 = { inaccessiblememonly nounwind willreturn }