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 %cmp = icmp ne ptr @foo, null
10 br i1 %cmp, label %if.then, label %if.end
13 tail call void (...) @foo( )
21 ; DARWIN: cmpl $0, L_foo$non_lazy_ptr
22 ; DARWIN: jne _foo ## TAILCALL
25 ; WIN32: cmpl $0, .refptr._foo
26 ; WIN32: jmpl *.refptr._foo
29 ; WIN64: cmpq $0, .refptr.foo(%rip)
30 ; WIN64: jmpq *.refptr.foo
33 declare extern_weak i32 @X(ptr)
35 @Y = global ptr @X ; <ptr> [#uses=0]
47 ; DARWIN: .weak_reference _foo
48 ; DARWIN: .weak_reference _X
50 ; WIN32: .section .rdata$.refptr._foo,"dr",discard,.refptr._foo
51 ; WIN32: .globl .refptr._foo
52 ; WIN32: .refptr._foo:
58 ; WIN64: .section .rdata$.refptr.foo,"dr",discard,.refptr.foo
59 ; WIN64: .globl .refptr.foo