[PowerPC] Don't run BV DAG Combine before legalization if it assumes legal types
[llvm-core.git] / test / Bitcode / thinlto-function-summary-callgraph-relbf.ll
blobd84517865a8ccbbe060408da64d6ee76e3881116
1 ; Test to check the callgraph in summary
2 ; RUN: opt -write-relbf-to-summary -module-summary %s -o %t.o
3 ; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
4 ; RUN: llvm-dis -o - %t.o | FileCheck %s --check-prefix=DIS
5 ; Round trip it through llvm-as
6 ; RUN: llvm-dis -o - %t.o | llvm-as -write-relbf-to-summary -o - | llvm-dis -o - | FileCheck %s --check-prefix=DIS
8 ; CHECK: <SOURCE_FILENAME
9 ; CHECK-NEXT: <GLOBALVAR
10 ; CHECK-NEXT: <FUNCTION
11 ; "func"
12 ; CHECK-NEXT: <FUNCTION op0=17 op1=4
13 ; CHECK:       <GLOBALVAL_SUMMARY_BLOCK
14 ; CHECK-NEXT:    <VERSION
15 ; See if the call to func is registered.
16 ; CHECK-NEXT:    <PERMODULE_RELBF {{.*}} op4=1 {{.*}} op7=256
17 ; CHECK-NEXT:  </GLOBALVAL_SUMMARY_BLOCK>
18 ; CHECK: <STRTAB_BLOCK
19 ; CHECK-NEXT: blob data = 'undefinedglobmainfunc{{.*}}'
22 ; ModuleID = 'thinlto-function-summary-callgraph.ll'
23 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
24 target triple = "x86_64-unknown-linux-gnu"
26 ; Function Attrs: nounwind uwtable
27 define i32 @main() #0 {
28 entry:
29     call void (...) @func()
30     %u = load i32, i32* @undefinedglob
31     ret i32 %u
34 declare void @func(...) #1
35 @undefinedglob = external global i32
37 ; OLD: Index {{.*}} contains 1 nodes (1 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls)
39 ; DIS: ^0 = module: (path: "{{.*}}", hash: (0, 0, 0, 0, 0))
40 ; DIS: ^1 = gv: (name: "func") ; guid = 7289175272376759421
41 ; DIS: ^2 = gv: (name: "main", summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 3, calls: ((callee: ^1, relbf: 256)), refs: (^3)))) ; guid = 15822663052811949562
42 ; DIS: ^3 = gv: (name: "undefinedglob") ; guid = 18036901804029949403