27 lines · plain
1;; Check that only one data variable is created when an instrprof.increment is2;; inlined into more than one function.3; RUN: opt %s -passes='cgscc(inline),instrprof' -S | FileCheck %s4 5target triple = "x86_64-unknown-linux-gnu"6 7; CHECK: @__profd_foobar = private global8; CHECK-NOT @__profd_foobar9 10declare void @llvm.instrprof.increment(ptr %0, i64 %1, i32 %2, i32 %3)11@__profn_foobar = private constant [6 x i8] c"foobar"12 13define internal void @foobar() {14 call void @llvm.instrprof.increment(ptr @__profn_foobar, i64 123456, i32 32, i32 0)15 ret void16}17 18define void @foo() {19 call void @foobar()20 ret void21}22 23define void @bar() {24 call void @foobar()25 ret void26}27