xref: /llvm-project/llvm/test/Transforms/PGOProfile/do-not-instrument.ll (revision 9ff36df5a4a7d52c51e950522870bb64912688d2)
1; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s
2
3target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-apple-macosx10.12.0"
5
6define i32 @f1() {
7; CHECK-LABEL: @f1
8entry:
9; CHECK: call void @llvm.instrprof.increment
10; CHECK-NOT: ptrtoint ptr asm sideeffect
11; CHECK-NOT: call void @llvm.instrprof.value.profile
12; CHECK: tail call void asm sideeffect
13  tail call void asm sideeffect "", "imr,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr undef) #0
14  ret i32 0
15}
16
17define i32 @f2() {
18entry:
19; CHECK: call void @llvm.instrprof.increment
20; CHECK-NOT: call void @llvm.instrprof.value.profile
21  call void (i32, ...) @foo(i32 21)
22  ret i32 0
23}
24
25declare void @foo(...) #0
26
27attributes #0 = { nounwind }
28