diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /test/LTO | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'test/LTO')
-rw-r--r-- | test/LTO/Inputs/bcsection.macho.s | 2 | ||||
-rw-r--r-- | test/LTO/Inputs/bcsection.s | 2 | ||||
-rw-r--r-- | test/LTO/bcsection.ll | 21 | ||||
-rw-r--r-- | test/LTO/diagnostic-handler-remarks.ll | 40 | ||||
-rw-r--r-- | test/LTO/jump-table-type.ll | 4 |
5 files changed, 67 insertions, 2 deletions
diff --git a/test/LTO/Inputs/bcsection.macho.s b/test/LTO/Inputs/bcsection.macho.s new file mode 100644 index 0000000..cb7fe03 --- /dev/null +++ b/test/LTO/Inputs/bcsection.macho.s @@ -0,0 +1,2 @@ +.section .llvmbc,.llvmbc +.incbin "bcsection.bc" diff --git a/test/LTO/Inputs/bcsection.s b/test/LTO/Inputs/bcsection.s new file mode 100644 index 0000000..ede1e5c --- /dev/null +++ b/test/LTO/Inputs/bcsection.s @@ -0,0 +1,2 @@ +.section .llvmbc +.incbin "bcsection.bc" diff --git a/test/LTO/bcsection.ll b/test/LTO/bcsection.ll new file mode 100644 index 0000000..e65ade6 --- /dev/null +++ b/test/LTO/bcsection.ll @@ -0,0 +1,21 @@ +; RUN: llvm-as -o %T/bcsection.bc %s + +; RUN: llvm-mc -I=%T -filetype=obj -triple=x86_64-pc-win32 -o %T/bcsection.coff.bco %p/Inputs/bcsection.s +; RUN: llvm-nm %T/bcsection.coff.bco | FileCheck %s +; RUN: llvm-lto -exported-symbol=main -exported-symbol=_main -o %T/bcsection.coff.o %T/bcsection.coff.bco +; RUN: llvm-nm %T/bcsection.coff.o | FileCheck %s + +; RUN: llvm-mc -I=%T -filetype=obj -triple=x86_64-unknown-linux-gnu -o %T/bcsection.elf.bco %p/Inputs/bcsection.s +; RUN: llvm-nm %T/bcsection.elf.bco | FileCheck %s +; RUN: llvm-lto -exported-symbol=main -exported-symbol=_main -o %T/bcsection.elf.o %T/bcsection.elf.bco +; RUN: llvm-nm %T/bcsection.elf.o | FileCheck %s + +; RUN: llvm-mc -I=%T -filetype=obj -triple=x86_64-apple-darwin11 -o %T/bcsection.macho.bco %p/Inputs/bcsection.macho.s +; RUN: llvm-nm %T/bcsection.macho.bco | FileCheck %s +; RUN: llvm-lto -exported-symbol=main -exported-symbol=_main -o %T/bcsection.macho.o %T/bcsection.macho.bco +; RUN: llvm-nm %T/bcsection.macho.o | FileCheck %s + +; CHECK: main +define i32 @main() { + ret i32 0 +} diff --git a/test/LTO/diagnostic-handler-remarks.ll b/test/LTO/diagnostic-handler-remarks.ll new file mode 100644 index 0000000..4da9101 --- /dev/null +++ b/test/LTO/diagnostic-handler-remarks.ll @@ -0,0 +1,40 @@ +; RUN: llvm-as < %s >%t.bc +; PR21108: Diagnostic handlers get pass remarks, even if they're not enabled. + +; Confirm that there are -pass-remarks. +; RUN: llvm-lto -pass-remarks=inline \ +; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \ +; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS +; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM + +; RUN: llvm-lto -pass-remarks=inline -use-diagnostic-handler \ +; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \ +; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS +; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM + +; Confirm that -pass-remarks are not printed by default. +; RUN: llvm-lto \ +; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \ +; RUN: FileCheck %s -allow-empty +; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM + +; RUN: llvm-lto -use-diagnostic-handler \ +; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \ +; RUN: FileCheck %s -allow-empty +; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM + +; REMARKS: remark: +; CHECK-NOT: remark: +; NM-NOT: foo +; NM: main + +target triple = "x86_64-apple-darwin" + +define i32 @foo() { + ret i32 7 +} + +define i32 @main() { + %i = call i32 @foo() + ret i32 %i +} diff --git a/test/LTO/jump-table-type.ll b/test/LTO/jump-table-type.ll index a39d3e9..a806c30 100644 --- a/test/LTO/jump-table-type.ll +++ b/test/LTO/jump-table-type.ll @@ -2,8 +2,8 @@ ; RUN: llvm-lto -o %t2 %t1 -jump-table-type=arity ; RUN: llvm-nm %t2 | FileCheck %s -; CHECK: T __llvm_jump_instr_table_0_1 -; CHECK: T __llvm_jump_instr_table_1_1 +; CHECK: t __llvm_jump_instr_table_0_1 +; CHECK: t __llvm_jump_instr_table_1_1 target triple = "x86_64-unknown-linux-gnu" |