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. 6 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, \ 12; RUN: -save-temps \ 13; RUN: -o %t.out 14 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) 18 19source_filename = "memprof-import-fix.ll" 20target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 21target triple = "x86_64-unknown-linux-gnu" 22 23define i32 @main() #0 { 24entry: 25 %call = call ptr @_Znam(i64 0), !memprof !0, !callsite !3 26 ret i32 0 27} 28 29declare ptr @_Znam(i64) 30 31attributes #0 = { noinline optnone } 32 33!0 = !{!1} 34!1 = !{!2, !"notcold"} 35!2 = !{i64 9086428284934609951} 36!3 = !{i64 9086428284934609951, i64 -5964873800580613432} 37