1 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -relocation-model=pic | FileCheck %s 2 3 ; While many of these could be tail called, we don't do it because it forces 4 ; early binding. 5 6 declare void @external() 7 8 define hidden void @tailcallee_hidden() { 9 entry: 10 ret void 11 } 12 13 define void @tailcall_hidden() { 14 entry: 15 tail call void @tailcallee_hidden() 16 ret void 17 } 18 ; CHECK: tailcall_hidden: 19 ; CHECK: jmp tailcallee_hidden 20 21 define internal void @tailcallee_internal() { 22 entry: 23 ret void 24 } 25 26 define void @tailcall_internal() { 27 entry: 28 tail call void @tailcallee_internal() 29 ret void 30 } 31 ; CHECK: tailcall_internal: 32 ; CHECK: jmp tailcallee_internal 33 34 define default void @tailcallee_default() { 35 entry: 36 ret void 37 } 38 39 define void @tailcall_default() { 40 entry: 41 tail call void @tailcallee_default() 42 ret void 43 } 44 ; CHECK: tailcall_default: 45 ; CHECK: calll tailcallee_default@PLT 46 47 define void @tailcallee_default_implicit() { 48 entry: 49 ret void 50 } 51 52 define void @tailcall_default_implicit() { 53 entry: 54 tail call void @tailcallee_default_implicit() 55 ret void 56 } 57 ; CHECK: tailcall_default_implicit: 58 ; CHECK: calll tailcallee_default_implicit@PLT 59 60 define void @tailcall_external() { 61 tail call void @external() 62 ret void 63 } 64 ; CHECK: tailcall_external: 65 ; CHECK: calll external@PLT 66 67 define void @musttail_external() { 68 musttail call void @external() 69 ret void 70 } 71 ; CHECK: musttail_external: 72 ; CHECK: movl external@GOT 73 ; CHECK: jmpl 74