summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/LTO/Resolution/X86/Inputs/mod-asm-used.ll4
-rw-r--r--llvm/test/LTO/Resolution/X86/mod-asm-used.ll10
-rw-r--r--llvm/test/tools/gold/X86/asm_undefined2.ll4
3 files changed, 16 insertions, 2 deletions
diff --git a/llvm/test/LTO/Resolution/X86/Inputs/mod-asm-used.ll b/llvm/test/LTO/Resolution/X86/Inputs/mod-asm-used.ll
new file mode 100644
index 00000000000..3b1988bb54d
--- /dev/null
+++ b/llvm/test/LTO/Resolution/X86/Inputs/mod-asm-used.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 = global i32 1, align 4
diff --git a/llvm/test/LTO/Resolution/X86/mod-asm-used.ll b/llvm/test/LTO/Resolution/X86/mod-asm-used.ll
new file mode 100644
index 00000000000..01befca84d0
--- /dev/null
+++ b/llvm/test/LTO/Resolution/X86/mod-asm-used.ll
@@ -0,0 +1,10 @@
+; RUN: opt -module-summary -o %t.bc %s
+; RUN: opt -module-summary -o %t2.bc %S/Inputs/mod-asm-used.ll
+; RUN: llvm-lto2 run %t.bc -r %t.bc,foo,l %t2.bc -r %t2.bc,foo,pl -o %t3
+; RUN: llvm-nm %t3.1 | FileCheck %s
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; CHECK: D foo
+module asm ".quad foo"
diff --git a/llvm/test/tools/gold/X86/asm_undefined2.ll b/llvm/test/tools/gold/X86/asm_undefined2.ll
index 6cb7a1cf3d0..a170f45a55a 100644
--- a/llvm/test/tools/gold/X86/asm_undefined2.ll
+++ b/llvm/test/tools/gold/X86/asm_undefined2.ll
@@ -11,8 +11,8 @@
; RUN: --plugin-opt=thinlto -o %t2 %t.o
; RUN: llvm-dis < %t.o.5.precodegen.bc | FileCheck %s
-; Check that foo is properly appended to llvm.compiler.used
-; CHECK: @llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
+; Check that foo is not internalized
+; CHECK: define void @foo
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
OpenPOWER on IntegriCloud