annotate llvm/test/Transforms/ADCE/delete-profiling-calls-to-constant.ll @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: opt < %s -passes=adce -S | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ; Verify that a call to instrument a constant is deleted.
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 @__profc_foo = private global [1 x i64] zeroinitializer, section "__llvm_prf_cnts", align 8
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
6 @__profd_foo = private global { i64, i64, ptr, ptr, ptr, i32, [1 x i16] } { i64 6699318081062747564, i64 0, ptr @__profc_foo, ptr @foo, ptr null, i32 1, [1 x i16] [i16 1] }, section "__llvm_prf_data", align 8
150
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 define i32 @foo() {
anatofuz
parents:
diff changeset
9 ; CHECK-NOT: call void @__llvm_profile_instrument_target
anatofuz
parents:
diff changeset
10 entry:
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
11 tail call void @__llvm_profile_instrument_target(i64 ptrtoint (ptr @bar to i64), ptr @__profd_foo, i32 0)
150
anatofuz
parents:
diff changeset
12 %call = tail call i32 @bar(i32 21)
anatofuz
parents:
diff changeset
13 ret i32 %call
anatofuz
parents:
diff changeset
14 }
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 declare i32 @bar(i32)
anatofuz
parents:
diff changeset
17
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
18 declare void @__llvm_profile_instrument_target(i64, ptr, i32)