summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionImport
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-10-17 00:19:21 +0000
committerTeresa Johnson <tejohnson@google.com>2018-10-17 00:19:21 +0000
commitcd00f564f86c4a35e08a26a815a3803d531e0b78 (patch)
treeb19fc2c86d523d89ba97b081327ad69d7e4f18dd /llvm/test/Transforms/FunctionImport
parent423957ad3ac5da0b2b263c955210a3eaf01fb4da (diff)
downloadbcm5719-llvm-cd00f564f86c4a35e08a26a815a3803d531e0b78.tar.gz
bcm5719-llvm-cd00f564f86c4a35e08a26a815a3803d531e0b78.zip
[ThinLTO] Fix test to require asserts
New test added in r344658 requires asserts due to -stats. While here, augment it to test new global variable importing message as well. llvm-svn: 344660
Diffstat (limited to 'llvm/test/Transforms/FunctionImport')
-rw-r--r--llvm/test/Transforms/FunctionImport/Inputs/import_stats.ll3
-rw-r--r--llvm/test/Transforms/FunctionImport/import_stats.ll5
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
OpenPOWER on IntegriCloud