From 3a0579f699df2fe8c30c1006a3cf89dfe503446e Mon Sep 17 00:00:00 2001 From: Piotr Padlewski Date: Wed, 7 Sep 2016 23:46:50 +0000 Subject: [PATCH] Revert "[thinlto] Deleted unused test file" This reverts commit a7ad00460027c4a92640c2a5706a7d1869b60989. llvm-svn: 280886 --- .../thinlto-function-summary-callgraph-pgo.ll | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll diff --git a/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll b/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll new file mode 100644 index 0000000..a927a16 --- /dev/null +++ b/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll @@ -0,0 +1,46 @@ +; Test to check the callgraph in summary when there is PGO +; RUN: opt -module-summary %s -o %t.o +; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s +; RUN: opt -module-summary %p/Inputs/thinlto-function-summary-callgraph.ll -o %t2.o +; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o +; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED + +; CHECK: +; CHECK-NEXT: +; CHECK-NEXT: + +; COMBINED: +; COMBINED-NEXT: +; COMBINED-NEXT: +; COMBINED-NEXT: + +; ModuleID = 'thinlto-function-summary-callgraph.ll' +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +; Function Attrs: nounwind uwtable +define i32 @main() #0 !prof !2 { +entry: + call void (...) @func() + ret i32 0 +} + +declare void @func(...) #1 + +!2 = !{!"function_entry_count", i64 1} -- 2.7.4