1 ; RUN: llc < %s -relocation-model=pic -mtriple=x86_64-pc-linux | FileCheck %s
2 ; RUN: llc < %s -relocation-model=pic -mtriple=i386-pc-linux | FileCheck --check-prefix=I386 %s
4 @foo1 = extern_weak hidden global i32, align 4
9 ; CHECK: movq foo1@GOTPCREL(%rip), %rax
11 ; I386: movl foo1@GOT(%eax), %eax
13 @foo2 = external hidden global i32, align 4
18 ; CHECK: leaq foo2(%rip), %rax
20 ; I386: leal foo2@GOTOFF(%eax), %eax
22 declare extern_weak hidden void @foo3()
32 declare external hidden void @foo4()
42 declare extern_weak hidden i32 @foo5()
43 define i32()* @bar5() {
47 ; CHECK: movq foo5@GOTPCREL(%rip), %rax
49 ; I386: movl foo5@GOT(%eax), %eax
51 declare external hidden i32 @foo6()
52 define i32()* @bar6() {
56 ; CHECK: leaq foo6(%rip), %rax
58 ; I386: leal foo6@GOTOFF(%eax), %eax