16b7209b3SEaswaran Raman; Test to check the callgraph in summary 26b7209b3SEaswaran Raman; RUN: opt -write-relbf-to-summary -module-summary %s -o %t.o 36b7209b3SEaswaran Raman; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s 46b7209b3SEaswaran Raman 56b7209b3SEaswaran Raman 66b7209b3SEaswaran Raman; CHECK: <SOURCE_FILENAME 76b7209b3SEaswaran Raman; CHECK-NEXT: <GLOBALVAR 86b7209b3SEaswaran Raman; CHECK-NEXT: <FUNCTION 96b7209b3SEaswaran Raman; "func" 106b7209b3SEaswaran Raman; CHECK-NEXT: <FUNCTION op0=17 op1=4 116b7209b3SEaswaran Raman; CHECK: <GLOBALVAL_SUMMARY_BLOCK 126b7209b3SEaswaran Raman; CHECK-NEXT: <VERSION 136b7209b3SEaswaran Raman; See if the call to func is registered. 14*385d8ea8SEaswaran Raman; CHECK-NEXT: <PERMODULE_RELBF {{.*}} op4=1 {{.*}} op7=256 156b7209b3SEaswaran Raman; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK> 166b7209b3SEaswaran Raman; CHECK: <STRTAB_BLOCK 176b7209b3SEaswaran Raman; CHECK-NEXT: blob data = 'undefinedglobmainfunc{{.*}}' 186b7209b3SEaswaran Raman 196b7209b3SEaswaran Raman 206b7209b3SEaswaran Raman; ModuleID = 'thinlto-function-summary-callgraph.ll' 216b7209b3SEaswaran Ramantarget datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 226b7209b3SEaswaran Ramantarget triple = "x86_64-unknown-linux-gnu" 236b7209b3SEaswaran Raman 246b7209b3SEaswaran Raman; Function Attrs: nounwind uwtable 256b7209b3SEaswaran Ramandefine i32 @main() #0 { 266b7209b3SEaswaran Ramanentry: 276b7209b3SEaswaran Raman call void (...) @func() 286b7209b3SEaswaran Raman %u = load i32, i32* @undefinedglob 296b7209b3SEaswaran Raman ret i32 %u 306b7209b3SEaswaran Raman} 316b7209b3SEaswaran Raman 326b7209b3SEaswaran Ramandeclare void @func(...) #1 336b7209b3SEaswaran Raman@undefinedglob = external global i32 346b7209b3SEaswaran Raman 356b7209b3SEaswaran Raman; OLD: Index {{.*}} contains 1 nodes (1 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls) 36