summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Herzka <herzka@instagram.com>2019-12-19 18:28:56 -0500
committerDavid Herzka <herzka@instagram.com>2019-12-25 18:59:21 -0500
commit2e6c15d1e7a47f11fab2dd3a40fcff01906923ae (patch)
tree9f4cdb438f69e9d8fcecd0ef91ff584fed4aff46
parentf9c3c5da19ab6d8cbbd4611fbb24e97fe7a85078 (diff)
downloadbcm5719-llvm-2e6c15d1e7a47f11fab2dd3a40fcff01906923ae.tar.gz
bcm5719-llvm-2e6c15d1e7a47f11fab2dd3a40fcff01906923ae.zip
Make lazyload_metadata.ll resilient to the addition of new metadata kinds
Summary: The specific number of records loaded depends on the number of kinds, but the difference between the lazy and not lazy cases does not. Reviewers: modocache Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71730
-rw-r--r--llvm/test/ThinLTO/X86/lazyload_metadata.ll25
1 files changed, 13 insertions, 12 deletions
diff --git a/llvm/test/ThinLTO/X86/lazyload_metadata.ll b/llvm/test/ThinLTO/X86/lazyload_metadata.ll
index 79c377724ef..3895b9faad1 100644
--- a/llvm/test/ThinLTO/X86/lazyload_metadata.ll
+++ b/llvm/test/ThinLTO/X86/lazyload_metadata.ll
@@ -7,18 +7,19 @@
; Check that importing @globalfunc1 does not trigger loading all the global
; metadata for @globalfunc2 and @globalfunc3
-; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc \
-; RUN: -o /dev/null -stats \
-; RUN: 2>&1 | FileCheck %s -check-prefix=LAZY
-; LAZY: 65 bitcode-reader - Number of Metadata records loaded
-; LAZY: 2 bitcode-reader - Number of MDStrings loaded
-
-; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc \
-; RUN: -o /dev/null -disable-ondemand-mds-loading -stats \
-; RUN: 2>&1 | FileCheck %s -check-prefix=NOTLAZY
-; NOTLAZY: 74 bitcode-reader - Number of Metadata records loaded
-; NOTLAZY: 7 bitcode-reader - Number of MDStrings loaded
-
+; RUN: (llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc -stats 2>&1 \
+; RUN: | awk '{print "LAZY: " $0}' && \
+; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc -stats -disable-ondemand-mds-loading 2>&1 \
+; RUN: | awk '{print "NOTLAZY: " $0}') \
+; RUN: | FileCheck %s
+
+; Check llvm-lto call with lazy loading enabled
+; CHECK: LAZY: [[#LAZY_RECORDS:]] bitcode-reader - Number of Metadata records loaded
+; CHECK: LAZY: 2 bitcode-reader - Number of MDStrings loaded
+
+; Check llvm-lto call with lazy loading disabled
+; CHECK: NOTLAZY: [[#LAZY_RECORDS+9]] bitcode-reader - Number of Metadata records loaded
+; CHECK: NOTLAZY: 7 bitcode-reader - Number of MDStrings loaded
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
OpenPOWER on IntegriCloud