llvm-project/lld/test/ELF/lto/common2.ll
Jon Chesterfield e0ca2ff070 [LLD] Mark a number of x86 only tests to require x86
Noticed while testing for an out of tree target. There are probably more tests that should be so marked.
I'm not sure who owns these tests so I've added a few names I recognise from the recent history.

With advice from probinson, ruiu, rafael and dramatically improved by davidb. Thank you all!

Differential Revision: https://reviews.llvm.org/D34685

llvm-svn: 308335
2017-07-18 18:40:50 +00:00

29 lines
789 B
LLVM

; REQUIRES: x86
; RUN: llvm-as %s -o %t1.o
; RUN: ld.lld -m elf_x86_64 %t1.o -o %t -shared -save-temps
; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s
; RUN: llvm-readobj -t %t | FileCheck %s --check-prefix=SHARED
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@a = common global i8 0, align 8
; CHECK-DAG: @a = common global i8 0, align 8
@b = common hidden global i32 0, align 4
define i32 @f() {
%t = load i32, i32* @b, align 4
ret i32 %t
}
; CHECK-DAG: @b = internal global i32 0, align 4
; SHARED: Symbol {
; SHARED: Name: a
; SHARED-NEXT: Value:
; SHARED-NEXT: Size: 1
; SHARED-NEXT: Binding: Global
; SHARED-NEXT: Type: Object
; SHARED-NEXT: Other: 0
; SHARED-NEXT: Section: .bss
; SHARED-NEXT: }