Imported Upstream version 5.18.0.205

Former-commit-id: 7f59f7e792705db773f1caecdaa823092f4e2927
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-16 08:20:38 +00:00
parent 5cd5df71cc
commit 8e12397d70
28486 changed files with 3867013 additions and 66 deletions

View File

@@ -0,0 +1,15 @@
target triple = "thumbv7-linux-gnueabihf"
define i32 @foo(i32 %a, i32 %b) #0 {
entry:
%add = add i32 %a, %b
ret i32 %add
}
define i32 @bar(i32 %a, i32 %b) #0 {
entry:
%add = add i32 %a, %b
ret i32 %add
}
attributes #0 = { "target-features"="+thumb-mode" }

View File

@@ -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"

View File

@@ -0,0 +1,32 @@
; Testcase to check that functions from a Thumb module can be inlined in an
; ARM function.
;
; RUN: llvm-as %s -o %t1.bc
; RUN: llvm-as %p/Inputs/thumb.ll -o %t2.bc
; RUN: llvm-lto -exported-symbol main \
; RUN: -exported-symbol bar \
; RUN: -filetype=asm \
; RUN: -o - \
; RUN: %t1.bc %t2.bc 2> %t3.out| FileCheck %s
; RUN: FileCheck --allow-empty --input-file %t3.out --check-prefix STDERR %s
target triple = "armv7-linux-gnueabihf"
; CHECK: .code 32
; CHECK-NEXT: main
; CHECK-NEXT: .fnstart
; CHECK-NEXT: mov r0, #30
; CHECK: .code 16
; CHECK-NEXT: .thumb_func
; CHECK-NEXT: bar
declare i32 @foo(i32 %a, i32 %b);
define i32 @main() {
entry:
%add = call i32 @foo(i32 10, i32 20)
ret i32 %add
}
; STDERR-NOT: warning: Linking two modules of different target triples:

View File

@@ -0,0 +1,2 @@
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@@ -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"}

View File

@@ -0,0 +1,4 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@a = global i32 42

View File

@@ -0,0 +1,23 @@
; ModuleID = 'comdat-mixed-lto1.o'
source_filename = "comdat-mixed-lto1.cpp"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"class.Test::ptr" = type { i32 }
$C = comdat any
@C = linkonce_odr global %"class.Test::ptr" zeroinitializer, comdat, align 4
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__cxx_global_var_init, i8* bitcast (%"class.Test::ptr"* @C to i8*) }]
define void @testglobfunc() #1 section ".text.startup" comdat($C) {
entry:
ret void
}
; Function Attrs: noinline uwtable
define internal void @__cxx_global_var_init() #1 section ".text.startup" comdat($C) {
entry:
store i32 0, i32* getelementptr inbounds (%"class.Test::ptr", %"class.Test::ptr"* @C, i32 0, i32 0), align 4
ret void
}

View File

@@ -0,0 +1,28 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
$c2 = comdat any
$c1 = comdat any
; This is only present in this file. The linker will keep $c1 from the first
; file and this will be undefined.
@will_be_undefined = global i32 1, comdat($c1)
@v1 = weak_odr global i32 41, comdat($c2)
define weak_odr protected i32 @f1(i8* %this) comdat($c2) {
bb20:
store i8* %this, i8** null
br label %bb21
bb21:
ret i32 41
}
@r21 = global i32* @v1
@r22 = global i32(i8*)* @f1
@a21 = alias i32, i32* @v1
@a22 = alias i16, bitcast (i32* @v1 to i16*)
@a23 = alias i32(i8*), i32(i8*)* @f1
@a24 = alias i16, bitcast (i32(i8*)* @f1 to i16*)
@a25 = alias i16, i16* @a24

View File

@@ -0,0 +1,8 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@v = common global i16 0, align 4
define i16 *@bar() {
ret i16 *@v
}

View File

@@ -0,0 +1,4 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@x = global i32 42, align 4

View File

@@ -0,0 +1,4 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@external = global i8 42

View File

@@ -0,0 +1,24 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @live1() {
call void @live2()
ret void
}
declare void @live2()
define void @dead1() {
call void @dead2()
ret void
}
declare void @dead2()
define linkonce_odr i8* @odr() {
ret i8* bitcast (void ()* @dead3 to i8*)
}
define internal void @dead3() {
ret void
}

View File

@@ -0,0 +1,4 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%foo = type { }
declare <4 x %foo*> @llvm.masked.load.v4p0foo.p0v4p0foo(<4 x %foo*>*, i32, <4 x i1>, <4 x %foo*>)

View File

@@ -0,0 +1,6 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define available_externally i32 @f() {
ret i32 2
}

View File

@@ -0,0 +1,6 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define linkonce_odr i32 @f() {
ret i32 2
}

View File

@@ -0,0 +1,2 @@
test:1000:0
1: 1000 bar:1000

View File

@@ -0,0 +1,2 @@
foo:100:100
1.0: 100 bar:100

View File

@@ -0,0 +1,7 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
declare i32 @g()
define i32 @main() {
call i32 @g()
ret i32 0
}

View File

@@ -0,0 +1,4 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@foo = global i32 1, align 4

View File

@@ -0,0 +1,22 @@
; RUN: llvm-as %s -o %t1.o
; RUN: llvm-as %p/Inputs/alias-1.ll -o %t2.o
; RUN: llvm-lto2 run -o %t3.o %t2.o %t1.o -r %t2.o,a,px -r %t1.o,a, -r %t1.o,b,px -save-temps
; RUN: llvm-dis < %t3.o.0.0.preopt.bc -o - | FileCheck %s
; RUN: FileCheck --check-prefix=RES %s < %t3.o.resolution.txt
; CHECK-NOT: alias
; CHECK: @a = global i32 42
; CHECK-NEXT: @b = global i32 1
; CHECK-NOT: alias
; RES: 2.o{{$}}
; RES: {{^}}-r={{.*}}2.o,a,px{{$}}
; RES: 1.o{{$}}
; RES: {{^}}-r={{.*}}1.o,b,px{{$}}
; RES: {{^}}-r={{.*}}1.o,a,{{$}}
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@a = weak alias i32, i32* @b
@b = global i32 1

Some files were not shown because too many files have changed in this diff Show More