diff options
Diffstat (limited to 'llvm/test/Transforms/FunctionImport')
-rw-r--r-- | llvm/test/Transforms/FunctionImport/Inputs/import_stats.ll | 3 | ||||
-rw-r--r-- | llvm/test/Transforms/FunctionImport/import_stats.ll | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionImport/Inputs/import_stats.ll b/llvm/test/Transforms/FunctionImport/Inputs/import_stats.ll index 4313883d926..818fbf20d6f 100644 --- a/llvm/test/Transforms/FunctionImport/Inputs/import_stats.ll +++ b/llvm/test/Transforms/FunctionImport/Inputs/import_stats.ll @@ -2,7 +2,10 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" +@globalvar = global i32 1, align 4 + define void @hot() { + store i32 0, i32* @globalvar, align 4 ret void } define void @critical() { diff --git a/llvm/test/Transforms/FunctionImport/import_stats.ll b/llvm/test/Transforms/FunctionImport/import_stats.ll index 43540856bd3..03f5f8f0198 100644 --- a/llvm/test/Transforms/FunctionImport/import_stats.ll +++ b/llvm/test/Transforms/FunctionImport/import_stats.ll @@ -1,5 +1,8 @@ ; Test to check thin link importing stats +; -stats requires asserts +; REQUIRES: asserts + ; RUN: opt -module-summary %s -o %t.bc ; RUN: opt -module-summary %p/Inputs/import_stats.ll -o %t2.bc @@ -14,8 +17,10 @@ ; RUN: -r %t2.bc,hot,plx \ ; RUN: -r %t2.bc,critical,plx \ ; RUN: -r %t2.bc,none,plx \ +; RUN: -r %t2.bc,globalvar,plx \ ; RUN: 2>&1 | FileCheck %s --check-prefix=THINLINKSTATS +; THINLINKSTATS-DAG: 1 function-import - Number of global variables thin link decided to import ; THINLINKSTATS-DAG: 1 function-import - Number of critical functions thin link decided to import ; THINLINKSTATS-DAG: 3 function-import - Number of functions thin link decided to import ; THINLINKSTATS-DAG: 1 function-import - Number of hot functions thin link decided to import |