diff options
author | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
commit | ebe69fe11e48d322045d5949c83283927a0d790b (patch) | |
tree | c92f1907a6b8006628a4b01615f38264d29834ea /test/LTO | |
parent | b7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff) | |
download | external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2 external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip |
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'test/LTO')
-rw-r--r-- | test/LTO/ARM/inline-asm.ll | 9 | ||||
-rw-r--r-- | test/LTO/ARM/lit.local.cfg | 2 | ||||
-rw-r--r-- | test/LTO/ARM/runtime-library-subtarget.ll | 18 | ||||
-rw-r--r-- | test/LTO/X86/Inputs/bcsection.macho.s (renamed from test/LTO/Inputs/bcsection.macho.s) | 0 | ||||
-rw-r--r-- | test/LTO/X86/Inputs/bcsection.s (renamed from test/LTO/Inputs/bcsection.s) | 0 | ||||
-rw-r--r-- | test/LTO/X86/Inputs/invalid.ll.bc | bin | 0 -> 332 bytes | |||
-rw-r--r-- | test/LTO/X86/Inputs/list-symbols.ll | 4 | ||||
-rw-r--r-- | test/LTO/X86/attrs.ll (renamed from test/LTO/attrs.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/bcsection.ll (renamed from test/LTO/bcsection.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/cfi_endproc.ll (renamed from test/LTO/cfi_endproc.ll) | 5 | ||||
-rw-r--r-- | test/LTO/X86/current-section.ll (renamed from test/LTO/current-section.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/diagnostic-handler-remarks.ll (renamed from test/LTO/diagnostic-handler-remarks.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/invalid.ll | 4 | ||||
-rw-r--r-- | test/LTO/X86/jump-table-type.ll (renamed from test/LTO/jump-table-type.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/keep-used-puts-during-instcombine.ll (renamed from test/LTO/keep-used-puts-during-instcombine.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/linkonce_odr_func.ll (renamed from test/LTO/linkonce_odr_func.ll) | 10 | ||||
-rw-r--r-- | test/LTO/X86/list-symbols.ll | 15 | ||||
-rw-r--r-- | test/LTO/X86/lit.local.cfg (renamed from test/LTO/lit.local.cfg) | 0 | ||||
-rw-r--r-- | test/LTO/X86/no-undefined-puts-when-implemented.ll (renamed from test/LTO/no-undefined-puts-when-implemented.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/private-symbol.ll (renamed from test/LTO/private-symbol.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/runtime-library.ll (renamed from test/LTO/runtime-library.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/set-merged.ll | 36 | ||||
-rw-r--r-- | test/LTO/X86/symver-asm.ll (renamed from test/LTO/symver-asm.ll) | 0 | ||||
-rw-r--r-- | test/LTO/X86/triple-init.ll (renamed from test/LTO/triple-init.ll) | 0 |
24 files changed, 103 insertions, 0 deletions
diff --git a/test/LTO/ARM/inline-asm.ll b/test/LTO/ARM/inline-asm.ll new file mode 100644 index 0000000000..23fb90457c --- /dev/null +++ b/test/LTO/ARM/inline-asm.ll @@ -0,0 +1,9 @@ +; Check that we don't crash on target-specific inline asm directives. +; +; RUN: llvm-as < %s > %t +; RUN: llvm-lto -o /dev/null %t -mcpu armv4t + +target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" +target triple = "armv4t-unknown-linux" + +module asm ".fnstart" diff --git a/test/LTO/ARM/lit.local.cfg b/test/LTO/ARM/lit.local.cfg new file mode 100644 index 0000000000..20e19aeb06 --- /dev/null +++ b/test/LTO/ARM/lit.local.cfg @@ -0,0 +1,2 @@ +if not 'ARM' in config.root.targets: + config.unsupported = True diff --git a/test/LTO/ARM/runtime-library-subtarget.ll b/test/LTO/ARM/runtime-library-subtarget.ll new file mode 100644 index 0000000000..aab1d90ea3 --- /dev/null +++ b/test/LTO/ARM/runtime-library-subtarget.ll @@ -0,0 +1,18 @@ +; Check that user-defined runtime library function __addsf3vfp is not removed +; +; RUN: llvm-as <%s >%t1 +; RUN: llvm-lto -o %t2 %t1 -mcpu arm1176jz-s +; RUN: llvm-nm %t2 | FileCheck %s + +target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32" +target triple = "thumbv7-apple-ios" + +; CHECK: ___addsf3vfp + +define float @__addsf3vfp(float %a, float %b) #0 { +entry: + %add = fadd float %a, %b + ret float %add +} + +attributes #0 = { "target-cpu"="arm1176jzf-s"} diff --git a/test/LTO/Inputs/bcsection.macho.s b/test/LTO/X86/Inputs/bcsection.macho.s index cb7fe03b3e..cb7fe03b3e 100644 --- a/test/LTO/Inputs/bcsection.macho.s +++ b/test/LTO/X86/Inputs/bcsection.macho.s diff --git a/test/LTO/Inputs/bcsection.s b/test/LTO/X86/Inputs/bcsection.s index ede1e5c532..ede1e5c532 100644 --- a/test/LTO/Inputs/bcsection.s +++ b/test/LTO/X86/Inputs/bcsection.s diff --git a/test/LTO/X86/Inputs/invalid.ll.bc b/test/LTO/X86/Inputs/invalid.ll.bc Binary files differnew file mode 100644 index 0000000000..a85c3644b3 --- /dev/null +++ b/test/LTO/X86/Inputs/invalid.ll.bc diff --git a/test/LTO/X86/Inputs/list-symbols.ll b/test/LTO/X86/Inputs/list-symbols.ll new file mode 100644 index 0000000000..9443d53550 --- /dev/null +++ b/test/LTO/X86/Inputs/list-symbols.ll @@ -0,0 +1,4 @@ +@glob = global i32 0 +define void @bar() { + ret void +} diff --git a/test/LTO/attrs.ll b/test/LTO/X86/attrs.ll index d1967470cd..d1967470cd 100644 --- a/test/LTO/attrs.ll +++ b/test/LTO/X86/attrs.ll diff --git a/test/LTO/bcsection.ll b/test/LTO/X86/bcsection.ll index e65ade6235..e65ade6235 100644 --- a/test/LTO/bcsection.ll +++ b/test/LTO/X86/bcsection.ll diff --git a/test/LTO/cfi_endproc.ll b/test/LTO/X86/cfi_endproc.ll index a5cc649fc8..1a69bf60f5 100644 --- a/test/LTO/cfi_endproc.ll +++ b/test/LTO/X86/cfi_endproc.ll @@ -35,3 +35,8 @@ define i32* @get_zed1() { ; ZED1_AND_ZED2: d zed2 @zed2 = linkonce_odr unnamed_addr global i32 42 + +define i32 @useZed2() { + %x = load i32* @zed2 + ret i32 %x +} diff --git a/test/LTO/current-section.ll b/test/LTO/X86/current-section.ll index f79b378318..f79b378318 100644 --- a/test/LTO/current-section.ll +++ b/test/LTO/X86/current-section.ll diff --git a/test/LTO/diagnostic-handler-remarks.ll b/test/LTO/X86/diagnostic-handler-remarks.ll index 4da9101117..4da9101117 100644 --- a/test/LTO/diagnostic-handler-remarks.ll +++ b/test/LTO/X86/diagnostic-handler-remarks.ll diff --git a/test/LTO/X86/invalid.ll b/test/LTO/X86/invalid.ll new file mode 100644 index 0000000000..5b6996d4ad --- /dev/null +++ b/test/LTO/X86/invalid.ll @@ -0,0 +1,4 @@ +; RUN: not llvm-lto %S/Inputs/invalid.ll.bc 2>&1 | FileCheck %s + + +; CHECK: llvm-lto{{.*}}: error loading file '{{.*}}/Inputs/invalid.ll.bc': Unknown attribute kind (48) diff --git a/test/LTO/jump-table-type.ll b/test/LTO/X86/jump-table-type.ll index a806c303f8..a806c303f8 100644 --- a/test/LTO/jump-table-type.ll +++ b/test/LTO/X86/jump-table-type.ll diff --git a/test/LTO/keep-used-puts-during-instcombine.ll b/test/LTO/X86/keep-used-puts-during-instcombine.ll index 69ce3ee3fa..69ce3ee3fa 100644 --- a/test/LTO/keep-used-puts-during-instcombine.ll +++ b/test/LTO/X86/keep-used-puts-during-instcombine.ll diff --git a/test/LTO/linkonce_odr_func.ll b/test/LTO/X86/linkonce_odr_func.ll index a67ffc0dd4..48da795388 100644 --- a/test/LTO/linkonce_odr_func.ll +++ b/test/LTO/X86/linkonce_odr_func.ll @@ -29,9 +29,19 @@ define linkonce_odr void @foo4() noinline { ; CHECK: r v1 @v1 = linkonce_odr constant i32 32 +define i32 @useV1() { + %x = load i32* @v1 + ret i32 %x +} + ; CHECK: V v2 @v2 = linkonce_odr global i32 32 +define i32 @useV2() { + %x = load i32* @v2 + ret i32 %x +} + declare void @f(void()*) declare void @p() diff --git a/test/LTO/X86/list-symbols.ll b/test/LTO/X86/list-symbols.ll new file mode 100644 index 0000000000..41b7d00dee --- /dev/null +++ b/test/LTO/X86/list-symbols.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as -o %T/1.bc %s +; RUN: llvm-as -o %T/2.bc %S/Inputs/list-symbols.ll +; RUN: llvm-lto -list-symbols-only %T/1.bc %T/2.bc | FileCheck %s + +; CHECK-LABEL: 1.bc: +; CHECK-DAG: foo +; CHECK-DAG: glob +; CHECK-LABEL: 2.bc: +; CHECK-DAG: glob +; CHECK-DAG: bar + +@glob = global i32 0 +define void @foo() { + ret void +} diff --git a/test/LTO/lit.local.cfg b/test/LTO/X86/lit.local.cfg index afde89be89..afde89be89 100644 --- a/test/LTO/lit.local.cfg +++ b/test/LTO/X86/lit.local.cfg diff --git a/test/LTO/no-undefined-puts-when-implemented.ll b/test/LTO/X86/no-undefined-puts-when-implemented.ll index 29db8a63d1..29db8a63d1 100644 --- a/test/LTO/no-undefined-puts-when-implemented.ll +++ b/test/LTO/X86/no-undefined-puts-when-implemented.ll diff --git a/test/LTO/private-symbol.ll b/test/LTO/X86/private-symbol.ll index e13a393442..e13a393442 100644 --- a/test/LTO/private-symbol.ll +++ b/test/LTO/X86/private-symbol.ll diff --git a/test/LTO/runtime-library.ll b/test/LTO/X86/runtime-library.ll index 76fc6f0cc4..76fc6f0cc4 100644 --- a/test/LTO/runtime-library.ll +++ b/test/LTO/X86/runtime-library.ll diff --git a/test/LTO/X86/set-merged.ll b/test/LTO/X86/set-merged.ll new file mode 100644 index 0000000000..0e2e1ea48c --- /dev/null +++ b/test/LTO/X86/set-merged.ll @@ -0,0 +1,36 @@ +; RUN: llvm-as < %s >%t1 +; RUN: llvm-lto -exported-symbol=_main -set-merged-module -o %t2 %t1 +; RUN: llvm-objdump -d %t2 | FileCheck %s + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.10.0" + +; CHECK: _main +; CHECK: movl $132 +define i32 @_Z3fooi(i32 %a) { +entry: + %a.addr = alloca i32, align 4 + store i32 %a, i32* %a.addr, align 4 + %0 = load i32* %a.addr, align 4 + %1 = load i32* %a.addr, align 4 + %call = call i32 @_Z4bar2i(i32 %1) + %add = add nsw i32 %0, %call + ret i32 %add +} + +define i32 @_Z4bar2i(i32 %a) { +entry: + %a.addr = alloca i32, align 4 + store i32 %a, i32* %a.addr, align 4 + %0 = load i32* %a.addr, align 4 + %mul = mul nsw i32 2, %0 + ret i32 %mul +} + +define i32 @main() { +entry: + %retval = alloca i32, align 4 + store i32 0, i32* %retval + %call = call i32 @_Z3fooi(i32 44) + ret i32 %call +} diff --git a/test/LTO/symver-asm.ll b/test/LTO/X86/symver-asm.ll index 03dda2bedd..03dda2bedd 100644 --- a/test/LTO/symver-asm.ll +++ b/test/LTO/X86/symver-asm.ll diff --git a/test/LTO/triple-init.ll b/test/LTO/X86/triple-init.ll index e0ad87967b..e0ad87967b 100644 --- a/test/LTO/triple-init.ll +++ b/test/LTO/X86/triple-init.ll |