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 4 5declare extern_weak void @foo(...) 6 7define void @bar() { 8entry: 9 br i1 icmp ne (void (...)* @foo, void (...)* null), label %if.then, label %if.end 10 11if.then: 12 tail call void (...) @foo( ) 13 ret void 14 15if.end: 16 ret void 17} 18 19; DARWIN-LABEL: _bar: 20; DARWIN: cmpl $0, L_foo$non_lazy_ptr 21; DARWIN: jmp _foo ## TAILCALL 22 23; WIN32-LABEL: _bar: 24; WIN32: cmpl $0, .refptr._foo 25; WIN32: jmpl *.refptr._foo 26 27; WIN64-LABEL: bar: 28; WIN64: cmpq $0, .refptr.foo(%rip) 29; WIN64: jmpq *.refptr.foo 30 31 32declare extern_weak i32 @X(i8*) 33 34@Y = global i32 (i8*)* @X ; <i32 (i8*)**> [#uses=0] 35 36; DARWIN-LABEL: _Y: 37; DARWIN: .long _X 38 39; WIN32-LABEL: _Y: 40; WIN32: .long _X 41 42; WIN64-LABEL: Y: 43; WIN64: .quad X 44 45 46; DARWIN: .weak_reference _foo 47; DARWIN: .weak_reference _X 48 49; WIN32: .section .rdata$.refptr._foo,"dr",discard,.refptr._foo 50; WIN32: .globl .refptr._foo 51; WIN32: .refptr._foo: 52; WIN32: .long _foo 53 54; WIN32: .weak _foo 55; WIN32: .weak _X 56 57; WIN64: .section .rdata$.refptr.foo,"dr",discard,.refptr.foo 58; WIN64: .globl .refptr.foo 59; WIN64: .refptr.foo: 60; WIN64: .quad foo 61 62; WIN64: .weak foo 63; WIN64: .weak X 64 65