Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,4 +0,0 @@
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

@ -1,23 +0,0 @@
; 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

@ -1,28 +0,0 @@
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

@ -1,8 +0,0 @@
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

@ -1,4 +0,0 @@
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

@ -1,4 +0,0 @@
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

@ -1,24 +0,0 @@
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

@ -1,4 +0,0 @@
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

@ -1,6 +0,0 @@
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

@ -1,6 +0,0 @@
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

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

View File

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

View File

@ -1,7 +0,0 @@
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

@ -1,4 +0,0 @@
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

@ -1,22 +0,0 @@
; 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

View File

@ -1,19 +0,0 @@
; Test the ability to emit assembly code from the resolution-based LTO API
;
; RUN: llvm-as < %s > %t1.bc
;
; RUN: llvm-lto2 run -filetype=asm -r %t1.bc,main,px -o %t2 %t1.bc
; RUN: FileCheck --check-prefix=ASM %s < %t2.0
; RUN: llvm-lto2 run -filetype=obj -r %t1.bc,main,px -o %t2 %t1.bc
; RUN: llvm-objdump -d %t2.0 | FileCheck --check-prefix=ASM %s
;
; ASM: main:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define i32 @main() {
entry:
ret i32 23
}

View File

@ -1,42 +0,0 @@
; Test of comdat handling with mixed thinlto and regular lto compilation.
; This module is compiled with ThinLTO
; RUN: opt -module-summary -o %t1.o %s
; Input module compiled for regular LTO
; RUN: opt -o %t2.o %p/Inputs/comdat-mixed-lto.ll
; The copy of C from this module is prevailing. The copy of C from the
; regular LTO module is not prevailing, and will be dropped to
; available_externally.
; RUN: llvm-lto2 run -r=%t1.o,C,pl -r=%t2.o,C,l -r=%t2.o,testglobfunc,lxp -r=%t1.o,testglobfunc,lx -o %t3 %t1.o %t2.o -save-temps
; The Input module (regular LTO) is %t3.0. Check to make sure that we removed
; __cxx_global_var_init and testglobfunc from comdat. Also check to ensure
; that testglobfunc was dropped to available_externally. Otherwise we would
; have linker multiply defined errors as it is no longer in a comdat and
; would clash with the copy from this module.
; RUN: llvm-dis %t3.0.0.preopt.bc -o - | FileCheck %s
; CHECK: define internal void @__cxx_global_var_init() section ".text.startup" {
; CHECK: define available_externally dso_local void @testglobfunc() section ".text.startup" {
; ModuleID = 'comdat-mixed-lto.o'
source_filename = "comdat-mixed-lto.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:
ret void
}

View File

@ -1,86 +0,0 @@
; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/comdat.ll -o %t2.o
; RUN: llvm-lto2 run -save-temps -o %t3.o %t.o %t2.o \
; RUN: -r=%t.o,f1,plx \
; RUN: -r=%t.o,v1,px \
; RUN: -r=%t.o,r11,px \
; RUN: -r=%t.o,r12,px \
; RUN: -r=%t.o,a11,px \
; RUN: -r=%t.o,a12,px \
; RUN: -r=%t.o,a13,px \
; RUN: -r=%t.o,a14,px \
; RUN: -r=%t.o,a15,px \
; RUN: -r=%t2.o,f1,l \
; RUN: -r=%t2.o,will_be_undefined, \
; RUN: -r=%t2.o,v1, \
; RUN: -r=%t2.o,r21,px \
; RUN: -r=%t2.o,r22,px \
; RUN: -r=%t2.o,a21,px \
; RUN: -r=%t2.o,a22,px \
; RUN: -r=%t2.o,a23,px \
; RUN: -r=%t2.o,a24,px \
; RUN: -r=%t2.o,a25,px
; RUN: llvm-dis %t3.o.0.2.internalize.bc -o - | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
$c1 = comdat any
@v1 = weak_odr global i32 42, comdat($c1)
define weak_odr i32 @f1(i8*) comdat($c1) {
bb10:
br label %bb11
bb11:
ret i32 42
}
@r11 = global i32* @v1
@r12 = global i32 (i8*)* @f1
@a11 = alias i32, i32* @v1
@a12 = alias i16, bitcast (i32* @v1 to i16*)
@a13 = alias i32 (i8*), i32 (i8*)* @f1
@a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*)
@a15 = alias i16, i16* @a14
; CHECK: $c1 = comdat any
; CHECK: $c2 = comdat any
; CHECK-DAG: @v1 = weak_odr global i32 42, comdat($c1)
; CHECK-DAG: @r11 = global i32* @v1{{$}}
; CHECK-DAG: @r12 = global i32 (i8*)* @f1{{$}}
; CHECK-DAG: @r21 = global i32* @v1{{$}}
; CHECK-DAG: @r22 = global i32 (i8*)* @f1{{$}}
; CHECK-DAG: @v1.1 = internal global i32 41, comdat($c2)
; CHECK-DAG: @a11 = alias i32, i32* @v1{{$}}
; CHECK-DAG: @a12 = alias i16, bitcast (i32* @v1 to i16*)
; CHECK-DAG: @a13 = alias i32 (i8*), i32 (i8*)* @f1{{$}}
; CHECK-DAG: @a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*)
; CHECK-DAG: @a21 = alias i32, i32* @v1.1{{$}}
; CHECK-DAG: @a22 = alias i16, bitcast (i32* @v1.1 to i16*)
; CHECK-DAG: @a23 = alias i32 (i8*), i32 (i8*)* @f1.2{{$}}
; CHECK-DAG: @a24 = alias i16, bitcast (i32 (i8*)* @f1.2 to i16*)
; CHECK: define weak_odr dso_local i32 @f1(i8*) comdat($c1) {
; CHECK-NEXT: bb10:
; CHECK-NEXT: br label %bb11{{$}}
; CHECK: bb11:
; CHECK-NEXT: ret i32 42
; CHECK-NEXT: }
; CHECK: define internal dso_local i32 @f1.2(i8* %this) comdat($c2) {
; CHECK-NEXT: bb20:
; CHECK-NEXT: store i8* %this, i8** null
; CHECK-NEXT: br label %bb21
; CHECK: bb21:
; CHECK-NEXT: ret i32 41
; CHECK-NEXT: }

View File

@ -1,70 +0,0 @@
; RUN: llvm-as < %s > %t1.bc
; RUN: llvm-as < %p/Inputs/common2.ll > %t2.bc
; Test that the common merging (size + alignment) is properly handled
; Client marked the "large with little alignment" one as prevailing
; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \
; RUN: -r %t1.bc,v,x \
; RUN: -r %t2.bc,v,px \
; RUN: -r %t1.bc,foo,px \
; RUN: -r %t2.bc,bar,px
; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=LARGE-PREVAILED
; Same as before, but reversing the order of the inputs
; RUN: llvm-lto2 run %t2.bc %t1.bc -o %t.o -save-temps \
; RUN: -r %t1.bc,v,x \
; RUN: -r %t2.bc,v,px \
; RUN: -r %t1.bc,foo,px \
; RUN: -r %t2.bc,bar,px
; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=LARGE-PREVAILED
; Client marked the "small with large alignment" one as prevailing
; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \
; RUN: -r %t1.bc,v,px \
; RUN: -r %t2.bc,v,x \
; RUN: -r %t1.bc,foo,px \
; RUN: -r %t2.bc,bar,px
; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=SMALL-PREVAILED
; Same as before, but reversing the order of the inputs
; RUN: llvm-lto2 run %t2.bc %t1.bc -o %t.o -save-temps \
; RUN: -r %t1.bc,v,px \
; RUN: -r %t2.bc,v,x \
; RUN: -r %t1.bc,foo,px \
; RUN: -r %t2.bc,bar,px
; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=SMALL-PREVAILED
; Client didn't mark any as prevailing, we keep the first one we see as "external"
; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \
; RUN: -r %t1.bc,v,x \
; RUN: -r %t2.bc,v,x \
; RUN: -r %t1.bc,foo,px \
; RUN: -r %t2.bc,bar,px
; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=NONE-PREVAILED1
; Same as before, but reversing the order of the inputs
; RUN: llvm-lto2 run %t2.bc %t1.bc -o %t.o -save-temps \
; RUN: -r %t1.bc,v,x \
; RUN: -r %t2.bc,v,x \
; RUN: -r %t1.bc,foo,px \
; RUN: -r %t2.bc,bar,px
; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=NONE-PREVAILED2
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@v = common global i8 0, align 8
; LARGE-PREVAILED: @v = common global i16 0, align 8
; SMALL-PREVAILED: @v = common global [2 x i8] zeroinitializer, align 8
; BOTH-PREVAILED1: @v = common global i16 0, align 8
; BOTH-PREVAILED2: common global [2 x i8] zeroinitializer, align 8
; In this case the first is kept as external
; NONE-PREVAILED1: @v = external global i8, align 8
; NONE-PREVAILED2: @v = external global i16, align 4
define i8 *@foo() {
ret i8 *@v
}

View File

@ -1,12 +0,0 @@
; RUN: llvm-as -o %t1.bc %s
; RUN: llvm-as -o %t2.bc %p/Inputs/commons.ll
; RUN: llvm-lto2 run %t1.bc -r=%t1.bc,x,l %t2.bc -r=%t2.bc,x,pl -o %t.out -save-temps
; RUN: llvm-dis -o - %t.out.0.0.preopt.bc | FileCheck %s
; A strong definition should override the common
; CHECK: @x = dso_local global i32 42, align 4
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@x = common global i16 0, align 2

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