1 ; RUN: llc < %s -mtriple=i686-apple-darwin | FileCheck %s --check-prefix=DARWIN
2 ; RUN: llc < %s -mtriple=i686-windows-msvc | FileCheck %s --check-prefix=WIN32
3 ; RUN: llc < %s -mtriple=x86_64-windows-msvc | FileCheck %s --check-prefix=WIN64
5 declare extern_weak void @foo(...)
9 br i1 icmp ne (void (...)* @foo, void (...)* null), label %if.then, label %if.end
12 tail call void (...) @foo( )
20 ; DARWIN: cmpl $0, L_foo$non_lazy_ptr
21 ; DARWIN: jmp _foo ## TAILCALL
24 ; WIN32: cmpl $0, .refptr._foo
25 ; WIN32: jmpl *.refptr._foo
28 ; WIN64: cmpq $0, .refptr.foo(%rip)
29 ; WIN64: jmpq *.refptr.foo
32 declare extern_weak i32 @X(i8*)
34 @Y = global i32 (i8*)* @X ; <i32 (i8*)**> [#uses=0]
46 ; DARWIN: .weak_reference _foo
47 ; DARWIN: .weak_reference _X
49 ; WIN32: .section .rdata$.refptr._foo,"dr",discard,.refptr._foo
50 ; WIN32: .globl .refptr._foo
51 ; WIN32: .refptr._foo:
57 ; WIN64: .section .rdata$.refptr.foo,"dr",discard,.refptr.foo
58 ; WIN64: .globl .refptr.foo