diff options
Diffstat (limited to 'test/Bitcode/thinlto-function-summary.ll')
| -rw-r--r-- | test/Bitcode/thinlto-function-summary.ll | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/test/Bitcode/thinlto-function-summary.ll b/test/Bitcode/thinlto-function-summary.ll index f3fb6c4f0105..e42c55c1c2eb 100644 --- a/test/Bitcode/thinlto-function-summary.ll +++ b/test/Bitcode/thinlto-function-summary.ll @@ -1,4 +1,5 @@ -; RUN: opt -name-anon-functions -module-summary < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC +; RUN: opt -name-anon-globals -module-summary < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC +; RUN: opt -passes=name-anon-globals -module-summary < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC ; Check for summary block/records. ; Check the value ids in the summary entries against the @@ -9,15 +10,19 @@ ; BC-NEXT: <PERMODULE {{.*}} op0=1 op1=0 ; BC-NEXT: <PERMODULE {{.*}} op0=2 op1=0 ; BC-NEXT: <PERMODULE {{.*}} op0=3 op1=7 -; BC-NEXT: <ALIAS {{.*}} op0=4 op1=0 op2=3 +; BC-NEXT: <PERMODULE {{.*}} op0=4 op1=32 +; BC-NEXT: <ALIAS {{.*}} op0=5 op1=0 op2=3 ; BC-NEXT: </GLOBALVAL_SUMMARY_BLOCK ; BC-NEXT: <VALUE_SYMTAB -; BC-NEXT: <FNENTRY {{.*}} op0=3 {{.*}}> record string = 'anon. +; BC-NEXT: <FNENTRY {{.*}} op0=4 {{.*}}> record string = 'variadic' ; BC-NEXT: <FNENTRY {{.*}} op0=1 {{.*}}> record string = 'foo' ; BC-NEXT: <FNENTRY {{.*}} op0=2 {{.*}}> record string = 'bar' -; BC-NEXT: <FNENTRY {{.*}} op0=4 {{.*}}> record string = 'f' +; BC-NEXT: <FNENTRY {{.*}} op0=5 {{.*}}> record string = 'f' +; BC-NEXT: <ENTRY {{.*}} record string = 'h' +; BC-NEXT: <FNENTRY {{.*}} op0=3 {{.*}}> record string = 'anon. + -; RUN: opt -name-anon-functions -module-summary < %s | llvm-dis | FileCheck %s +; RUN: opt -name-anon-globals -module-summary < %s | llvm-dis | FileCheck %s ; Check that this round-trips correctly. ; ModuleID = '<stdin>' @@ -41,7 +46,7 @@ entry: } ; FIXME: Anonymous function and alias not currently in summary until -; follow on fixes to rename anonymous functions and emit alias summary +; follow on fixes to rename anonymous globals and emit alias summary ; entries are committed. ; Check an anonymous function as well, since in that case only the alias ; ends up in the value symbol table and having a summary. @@ -56,3 +61,7 @@ entry: return: ; preds = %entry ret void } + +define i32 @variadic(...) { + ret i32 42 +} |
