1; RUN: llc -o - %s -relocation-model=pic | FileCheck %s
2; Check that we do not get GOT relocations with the x86_64-pc-windows-macho
3; triple.
4target triple = "x86_64-pc-windows-macho"
5
6@g = common global i32 0, align 4
7
8declare i32 @extbar()
9
10; CHECK-LABEL: bar:
11; CHECK: callq _extbar
12; CHECK: leaq _extbar(%rip),
13; CHECK-NOT: @GOT
14define i8* @bar() {
15  call i32 @extbar()
16  ret i8* bitcast (i32 ()* @extbar to i8*)
17}
18
19; CHECK-LABEL: foo:
20; CHECK: callq _bar
21; CHECK: movl _g(%rip),
22; CHECK-NOT: @GOT
23define i32 @foo() {
24  call i8* @bar()
25  %gval = load i32, i32* @g, align 4
26  ret i32 %gval
27}
28