diff options
Diffstat (limited to 'test/Bitcode')
-rw-r--r-- | test/Bitcode/thinlto-function-summary-callgraph.ll | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/Bitcode/thinlto-function-summary-callgraph.ll b/test/Bitcode/thinlto-function-summary-callgraph.ll index 8cc60ad6336..566f3a077e7 100644 --- a/test/Bitcode/thinlto-function-summary-callgraph.ll +++ b/test/Bitcode/thinlto-function-summary-callgraph.ll @@ -11,20 +11,23 @@ ; RUN: llvm-lto -thinlto-index-stats %p/Inputs/thinlto-function-summary-callgraph-combined.1.bc | FileCheck %s --check-prefix=OLD-COMBINED ; CHECK: <SOURCE_FILENAME +; CHECK-NEXT: <GLOBALVAR ; CHECK-NEXT: <FUNCTION ; "func" -; CHECK-NEXT: <FUNCTION op0=4 op1=4 +; CHECK-NEXT: <FUNCTION op0=17 op1=4 ; CHECK: <GLOBALVAL_SUMMARY_BLOCK ; CHECK-NEXT: <VERSION ; See if the call to func is registered. -; CHECK-NEXT: <PERMODULE {{.*}} op4=1/> +; CHECK-NEXT: <PERMODULE {{.*}} op3=1 ; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK> ; CHECK: <STRTAB_BLOCK -; CHECK-NEXT: blob data = 'mainfunc' +; CHECK-NEXT: blob data = 'undefinedglobmainfunc' ; COMBINED: <GLOBALVAL_SUMMARY_BLOCK ; COMBINED-NEXT: <VERSION +; Only 2 VALUE_GUID since reference to undefinedglob should not be included in +; combined index. ; COMBINED-NEXT: <VALUE_GUID op0=[[FUNCID:[0-9]+]] op1=7289175272376759421/> ; COMBINED-NEXT: <VALUE_GUID ; COMBINED-NEXT: <COMBINED @@ -40,10 +43,12 @@ target triple = "x86_64-unknown-linux-gnu" define i32 @main() #0 { entry: call void (...) @func() - ret i32 0 + %u = load i32, i32* @undefinedglob + ret i32 %u } declare void @func(...) #1 +@undefinedglob = external global i32 ; OLD: Index {{.*}} contains 1 nodes (1 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls) ; OLD-COMBINED: Index {{.*}} contains 2 nodes (2 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls) |