xref: /llvm-project/llvm/test/ThinLTO/X86/memprof-old-alloc-context-summary.ll (revision 776476c282bca71d5b856e80e0a88fbd6f3ccdd2)
1*776476c2STeresa Johnson;; Check that we can read the old *_ALLOC_INFO summary format that placed the
2*776476c2STeresa Johnson;; stack id indexes directly in the alloc info summary, rather than encoding as
3*776476c2STeresa Johnson;; a separate radix tree.
4*776476c2STeresa Johnson;;
5*776476c2STeresa Johnson;; The old bitcode was generated by the older compiler from `opt -thinlto-bc`
6*776476c2STeresa Johnson;; on the following LLVM assembly:
7*776476c2STeresa Johnson;;
8*776476c2STeresa Johnson;; target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
9*776476c2STeresa Johnson;; target triple = "x86_64-unknown-linux-gnu"
10*776476c2STeresa Johnson;;
11*776476c2STeresa Johnson;; define internal ptr @_Z3barv() #0 {
12*776476c2STeresa Johnson;; entry:
13*776476c2STeresa Johnson;;   %call = call ptr @_Znam(i64 0), !memprof !1, !callsite !6
14*776476c2STeresa Johnson;;   ret ptr null
15*776476c2STeresa Johnson;; }
16*776476c2STeresa Johnson;;
17*776476c2STeresa Johnson;; declare ptr @_Znam(i64)
18*776476c2STeresa Johnson;;
19*776476c2STeresa Johnson;; !1 = !{!2, !4}
20*776476c2STeresa Johnson;; !2 = !{!3, !"notcold"}
21*776476c2STeresa Johnson;; !3 = !{i64 9086428284934609951, i64 8632435727821051414}
22*776476c2STeresa Johnson;; !4 = !{!5, !"cold"}
23*776476c2STeresa Johnson;; !5 = !{i64 9086428284934609951, i64 2732490490862098848}
24*776476c2STeresa Johnson;; !6 = !{i64 9086428284934609951}
25*776476c2STeresa Johnson
26*776476c2STeresa Johnson; RUN: llvm-dis %S/Inputs/memprof-old-alloc-context-summary.bc -o - | FileCheck %s
27*776476c2STeresa Johnson; CHECK: stackIds: (8632435727821051414)
28*776476c2STeresa Johnson; CHECK-SAME: stackIds: (2732490490862098848)
29