Xamarin Public Jenkins (auto-signing) 279aa8f685 Imported Upstream version 5.18.0.246
Former-commit-id: 0c7ce5b1a7851e13f22acfd379b7f9fb304e4833
2019-01-23 08:21:40 +00:00

28 lines
595 B
LLVM

; RUN: llc -o - %s -relocation-model=pic | FileCheck %s
; Check that we do not get GOT relocations with the x86_64-pc-windows-macho
; triple.
target triple = "x86_64-pc-windows-macho"
@g = common global i32 0, align 4
declare i32 @extbar()
; CHECK-LABEL: bar:
; CHECK: callq _extbar
; CHECK: leaq _extbar(%rip),
; CHECK-NOT: @GOT
define i8* @bar() {
call i32 @extbar()
ret i8* bitcast (i32 ()* @extbar to i8*)
}
; CHECK-LABEL: foo:
; CHECK: callq _bar
; CHECK: movl _g(%rip),
; CHECK-NOT: @GOT
define i32 @foo() {
call i8* @bar()
%gval = load i32, i32* @g, align 4
ret i32 %gval
}