1 ;; Test to ensure that importing of cloning decisions does not assert when
2 ;; the callsite context is longer than the MIB context.
3 ;; FIXME: Presumably this happened as a result of inlining, but in theory the
4 ;; metadata should have been replaced with an attribute in that case. Need to
5 ;; investigate why this is occuring.
7 ; RUN: opt -thinlto-bc %s >%t.o
8 ; RUN: llvm-lto2 run %t.o -enable-memprof-context-disambiguation \
9 ; RUN: -supports-hot-cold-new \
10 ; RUN: -r=%t.o,main,plx \
11 ; RUN: -r=%t.o,_Znam, \
15 ; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s --check-prefix=IR
16 ;; The call to new is not changed in this case.
17 ; IR: call ptr @_Znam(i64 0)
19 source_filename = "memprof-import-fix.ll"
20 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
21 target triple = "x86_64-unknown-linux-gnu"
23 define i32 @main() #0 {
25 %call = call ptr @_Znam(i64 0), !memprof !0, !callsite !3
29 declare ptr @_Znam(i64)
31 attributes #0 = { noinline optnone }
34 !1 = !{!2, !"notcold"}
35 !2 = !{i64 9086428284934609951}
36 !3 = !{i64 9086428284934609951, i64 -5964873800580613432}