diff options
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 (renamed from test/LTO/Inputs/invalid.ll.bc) | bin | 332 -> 332 bytes | |||
| -rw-r--r-- | test/LTO/X86/Inputs/list-symbols.ll (renamed from test/LTO/Inputs/list-symbols.ll) | 0 | ||||
| -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) | 4 | ||||
| -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 (renamed from test/LTO/invalid.ll) | 0 | ||||
| -rw-r--r-- | test/LTO/X86/keep-used-puts-during-instcombine.ll (renamed from test/LTO/keep-used-puts-during-instcombine.ll) | 4 | ||||
| -rw-r--r-- | test/LTO/X86/linkonce_odr_func.ll (renamed from test/LTO/linkonce_odr_func.ll) | 6 | ||||
| -rw-r--r-- | test/LTO/X86/list-symbols.ll (renamed from test/LTO/list-symbols.ll) | 0 | ||||
| -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) | 4 | ||||
| -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 | ||||
| -rw-r--r-- | test/LTO/jump-table-type.ll | 23 |
24 files changed, 74 insertions, 32 deletions
diff --git a/test/LTO/ARM/inline-asm.ll b/test/LTO/ARM/inline-asm.ll new file mode 100644 index 000000000000..23fb90457c14 --- /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 000000000000..20e19aeb06f9 --- /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 000000000000..aab1d90ea3b9 --- /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 cb7fe03b3e73..cb7fe03b3e73 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 ede1e5c532dd..ede1e5c532dd 100644 --- a/test/LTO/Inputs/bcsection.s +++ b/test/LTO/X86/Inputs/bcsection.s diff --git a/test/LTO/Inputs/invalid.ll.bc b/test/LTO/X86/Inputs/invalid.ll.bc Binary files differindex a85c3644b3ab..a85c3644b3ab 100644 --- a/test/LTO/Inputs/invalid.ll.bc +++ b/test/LTO/X86/Inputs/invalid.ll.bc diff --git a/test/LTO/Inputs/list-symbols.ll b/test/LTO/X86/Inputs/list-symbols.ll index 9443d535503a..9443d535503a 100644 --- a/test/LTO/Inputs/list-symbols.ll +++ b/test/LTO/X86/Inputs/list-symbols.ll diff --git a/test/LTO/attrs.ll b/test/LTO/X86/attrs.ll index d1967470cdd3..d1967470cdd3 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 e65ade623536..e65ade623536 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 1a69bf60f54b..57d822b047e3 100644 --- a/test/LTO/cfi_endproc.ll +++ b/test/LTO/X86/cfi_endproc.ll @@ -25,7 +25,7 @@ define i32 @main(i32 %argc, i8** %argv) { ret i32 0 } -; RUN: llvm-lto -o %t -dso-symbol=zed1 -dso-symbol=zed2 %t1 -disable-opt +; RUN: llvm-lto -o %t -dso-symbol=zed1 -dso-symbol=zed2 %t1 -O0 ; RUN: llvm-nm %t | FileCheck %s -check-prefix=ZED1_AND_ZED2 ; ZED1_AND_ZED2: V zed1 @zed1 = linkonce_odr global i32 42 @@ -37,6 +37,6 @@ define i32* @get_zed1() { @zed2 = linkonce_odr unnamed_addr global i32 42 define i32 @useZed2() { - %x = load i32* @zed2 + %x = load i32, i32* @zed2 ret i32 %x } diff --git a/test/LTO/current-section.ll b/test/LTO/X86/current-section.ll index f79b378318df..f79b378318df 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 4da9101117ec..4da9101117ec 100644 --- a/test/LTO/diagnostic-handler-remarks.ll +++ b/test/LTO/X86/diagnostic-handler-remarks.ll diff --git a/test/LTO/invalid.ll b/test/LTO/X86/invalid.ll index 5b6996d4ad35..5b6996d4ad35 100644 --- a/test/LTO/invalid.ll +++ b/test/LTO/X86/invalid.ll diff --git a/test/LTO/keep-used-puts-during-instcombine.ll b/test/LTO/X86/keep-used-puts-during-instcombine.ll index 69ce3ee3fae5..26249477ce24 100644 --- a/test/LTO/keep-used-puts-during-instcombine.ll +++ b/test/LTO/X86/keep-used-puts-during-instcombine.ll @@ -15,8 +15,8 @@ target triple = "x86_64-apple-darwin11" define i32 @uses_printf(i32 %i) { entry: - %s = getelementptr [13 x i8]* @str, i64 0, i64 0 - call i32 (i8*, ...)* @printf(i8* %s) + %s = getelementptr [13 x i8], [13 x i8]* @str, i64 0, i64 0 + call i32 (i8*, ...) @printf(i8* %s) ret i32 0 } diff --git a/test/LTO/linkonce_odr_func.ll b/test/LTO/X86/linkonce_odr_func.ll index 48da7953885f..7fa6527f47c7 100644 --- a/test/LTO/linkonce_odr_func.ll +++ b/test/LTO/X86/linkonce_odr_func.ll @@ -1,6 +1,6 @@ ; RUN: llvm-as < %s >%t1 ; RUN: llvm-lto -o %t2 -dso-symbol=foo1 -dso-symbol=foo2 -dso-symbol=foo3 \ -; RUN: -dso-symbol=foo4 -dso-symbol=v1 -dso-symbol=v2 %t1 -disable-opt +; RUN: -dso-symbol=foo4 -dso-symbol=v1 -dso-symbol=v2 %t1 -O0 ; RUN: llvm-nm %t2 | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" @@ -30,7 +30,7 @@ define linkonce_odr void @foo4() noinline { @v1 = linkonce_odr constant i32 32 define i32 @useV1() { - %x = load i32* @v1 + %x = load i32, i32* @v1 ret i32 %x } @@ -38,7 +38,7 @@ define i32 @useV1() { @v2 = linkonce_odr global i32 32 define i32 @useV2() { - %x = load i32* @v2 + %x = load i32, i32* @v2 ret i32 %x } diff --git a/test/LTO/list-symbols.ll b/test/LTO/X86/list-symbols.ll index 41b7d00deecc..41b7d00deecc 100644 --- a/test/LTO/list-symbols.ll +++ b/test/LTO/X86/list-symbols.ll diff --git a/test/LTO/lit.local.cfg b/test/LTO/X86/lit.local.cfg index afde89be896d..afde89be896d 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 29db8a63d1dd..132ec671d5ba 100644 --- a/test/LTO/no-undefined-puts-when-implemented.ll +++ b/test/LTO/X86/no-undefined-puts-when-implemented.ll @@ -20,8 +20,8 @@ entry: } define i32 @uses_printf(i32 %i) { entry: - %s = getelementptr [13 x i8]* @str, i64 0, i64 0 - call i32 (i8*, ...)* @printf(i8* %s) + %s = getelementptr [13 x i8], [13 x i8]* @str, i64 0, i64 0 + call i32 (i8*, ...) @printf(i8* %s) ret i32 0 } diff --git a/test/LTO/private-symbol.ll b/test/LTO/X86/private-symbol.ll index e13a393442d3..e13a393442d3 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 76fc6f0cc47b..76fc6f0cc47b 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 000000000000..aaafc5e912a4 --- /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, i32* %a.addr, align 4 + %1 = load i32, 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, 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 03dda2bedd96..03dda2bedd96 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 e0ad87967ba2..e0ad87967ba2 100644 --- a/test/LTO/triple-init.ll +++ b/test/LTO/X86/triple-init.ll diff --git a/test/LTO/jump-table-type.ll b/test/LTO/jump-table-type.ll deleted file mode 100644 index a806c303f8c5..000000000000 --- a/test/LTO/jump-table-type.ll +++ /dev/null @@ -1,23 +0,0 @@ -; RUN: llvm-as <%s >%t1 -; 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 - -target triple = "x86_64-unknown-linux-gnu" - -define i32 @g(i32 %a) unnamed_addr jumptable { - ret i32 %a -} - -define i32 @f() unnamed_addr jumptable { - ret i32 0 -} - -define i32 @main() { - ret i32 0 -} - -@llvm.used = appending global [2 x i8*] [i8* bitcast (i32(i32)* @g to i8*), - i8* bitcast (i32()* @f to i8*)] |
