[llvm] r344660 - [ThinLTO] Fix test to require asserts
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 16 17:19:21 PDT 2018
Author: tejohnson
Date: Tue Oct 16 17:19:21 2018
New Revision: 344660
URL: http://llvm.org/viewvc/llvm-project?rev=344660&view=rev
Log:
[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.
Modified:
llvm/trunk/test/Transforms/FunctionImport/Inputs/import_stats.ll
llvm/trunk/test/Transforms/FunctionImport/import_stats.ll
Modified: llvm/trunk/test/Transforms/FunctionImport/Inputs/import_stats.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/FunctionImport/Inputs/import_stats.ll?rev=344660&r1=344659&r2=344660&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/FunctionImport/Inputs/import_stats.ll (original)
+++ llvm/trunk/test/Transforms/FunctionImport/Inputs/import_stats.ll Tue Oct 16 17:19:21 2018
@@ -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"
+ at globalvar = global i32 1, align 4
+
define void @hot() {
+ store i32 0, i32* @globalvar, align 4
ret void
}
define void @critical() {
Modified: llvm/trunk/test/Transforms/FunctionImport/import_stats.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/FunctionImport/import_stats.ll?rev=344660&r1=344659&r2=344660&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/FunctionImport/import_stats.ll (original)
+++ llvm/trunk/test/Transforms/FunctionImport/import_stats.ll Tue Oct 16 17:19:21 2018
@@ -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
More information about the llvm-commits
mailing list