xref: /aosp_15_r20/external/llvm/test/Transforms/PGOProfile/do-not-instrument.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
5*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx10.12.0"
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine i32 @f1() {
8*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @f1
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker; CHECK: call void @llvm.instrprof.increment
11*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: ptrtoint void (i8*)* asm sideeffect
12*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: call void @llvm.instrprof.value.profile
13*9880d681SAndroid Build Coastguard Worker; CHECK: tail call void asm sideeffect
14*9880d681SAndroid Build Coastguard Worker  tail call void asm sideeffect "", "imr,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* undef) #0
15*9880d681SAndroid Build Coastguard Worker  ret i32 0
16*9880d681SAndroid Build Coastguard Worker}
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerdefine i32 @f2() {
19*9880d681SAndroid Build Coastguard Workerentry:
20*9880d681SAndroid Build Coastguard Worker; CHECK: call void @llvm.instrprof.increment
21*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: call void @llvm.instrprof.value.profile
22*9880d681SAndroid Build Coastguard Worker  call void (i32, ...) bitcast (void (...)* @foo to void (i32, ...)*)(i32 21)
23*9880d681SAndroid Build Coastguard Worker  ret i32 0
24*9880d681SAndroid Build Coastguard Worker}
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workerdeclare void @foo(...) #0
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind }
29