diff options
| author | David Herzka <david@herzka.com> | 2019-12-26 13:56:07 -0500 |
|---|---|---|
| committer | David Herzka <david@herzka.com> | 2019-12-26 18:23:08 -0500 |
| commit | 4e5d134da1cf948f02fc283adc65c723c6672eaa (patch) | |
| tree | 3f7ff724284f013cfeb96678fa89a180412ddd72 | |
| parent | f953882113d089206821ad3113a48d873b7c7f23 (diff) | |
| download | bcm5719-llvm-4e5d134da1cf948f02fc283adc65c723c6672eaa.tar.gz bcm5719-llvm-4e5d134da1cf948f02fc283adc65c723c6672eaa.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: llvm-commits, dexonsmith, steven_wu, hiraditya, mehdi_amini
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71882
| -rw-r--r-- | llvm/test/ThinLTO/X86/lazyload_metadata.ll | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/llvm/test/ThinLTO/X86/lazyload_metadata.ll b/llvm/test/ThinLTO/X86/lazyload_metadata.ll index 79c377724ef..351201982d9 100644 --- a/llvm/test/ThinLTO/X86/lazyload_metadata.ll +++ b/llvm/test/ThinLTO/X86/lazyload_metadata.ll @@ -7,18 +7,17 @@ ; 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> %t4.txt +; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc -stats -disable-ondemand-mds-loading 2> %t5.txt +; RUN: cat %t4.txt %t5.txt | FileCheck %s +; Check llvm-lto call with lazy loading enabled +; CHECK: [[#LAZY_RECORDS:]] bitcode-reader - Number of Metadata records loaded +; CHECK: 2 bitcode-reader - Number of MDStrings loaded + +; Check llvm-lto call with lazy loading disabled +; CHECK: [[#LAZY_RECORDS+9]] bitcode-reader - Number of Metadata records loaded +; CHECK: 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" |

