summaryrefslogtreecommitdiff
path: root/test/LTO/Resolution/X86/Inputs
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
commitb915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch)
tree98b8f811c7aff2547cab8642daf372d6c59502fb /test/LTO/Resolution/X86/Inputs
parent6421cca32f69ac849537a3cff78c352195e99f1b (diff)
Notes
Diffstat (limited to 'test/LTO/Resolution/X86/Inputs')
-rw-r--r--test/LTO/Resolution/X86/Inputs/alias-1.ll4
-rw-r--r--test/LTO/Resolution/X86/Inputs/comdat.ll28
-rw-r--r--test/LTO/Resolution/X86/Inputs/common2.ll8
-rw-r--r--test/LTO/Resolution/X86/Inputs/commons.ll4
-rw-r--r--test/LTO/Resolution/X86/Inputs/intrinsic.ll4
-rw-r--r--test/LTO/Resolution/X86/Inputs/mixed_lto.ll7
6 files changed, 55 insertions, 0 deletions
diff --git a/test/LTO/Resolution/X86/Inputs/alias-1.ll b/test/LTO/Resolution/X86/Inputs/alias-1.ll
new file mode 100644
index 000000000000..01c9987fd3f9
--- /dev/null
+++ b/test/LTO/Resolution/X86/Inputs/alias-1.ll
@@ -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
diff --git a/test/LTO/Resolution/X86/Inputs/comdat.ll b/test/LTO/Resolution/X86/Inputs/comdat.ll
new file mode 100644
index 000000000000..ca4bbb4bf81e
--- /dev/null
+++ b/test/LTO/Resolution/X86/Inputs/comdat.ll
@@ -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
diff --git a/test/LTO/Resolution/X86/Inputs/common2.ll b/test/LTO/Resolution/X86/Inputs/common2.ll
new file mode 100644
index 000000000000..c3a7f753684d
--- /dev/null
+++ b/test/LTO/Resolution/X86/Inputs/common2.ll
@@ -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
+}
diff --git a/test/LTO/Resolution/X86/Inputs/commons.ll b/test/LTO/Resolution/X86/Inputs/commons.ll
new file mode 100644
index 000000000000..9372600d03de
--- /dev/null
+++ b/test/LTO/Resolution/X86/Inputs/commons.ll
@@ -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
diff --git a/test/LTO/Resolution/X86/Inputs/intrinsic.ll b/test/LTO/Resolution/X86/Inputs/intrinsic.ll
new file mode 100644
index 000000000000..52ee296b18bb
--- /dev/null
+++ b/test/LTO/Resolution/X86/Inputs/intrinsic.ll
@@ -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*>)
diff --git a/test/LTO/Resolution/X86/Inputs/mixed_lto.ll b/test/LTO/Resolution/X86/Inputs/mixed_lto.ll
new file mode 100644
index 000000000000..2393deb32414
--- /dev/null
+++ b/test/LTO/Resolution/X86/Inputs/mixed_lto.ll
@@ -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
+}