1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=x86 < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=x86 -O0 < %s | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t1: 5*9880d681SAndroid Build Coastguard Worker; CHECK: jmp {{_?}}t1_callee 6*9880d681SAndroid Build Coastguard Workerdefine x86_thiscallcc void @t1(i8* %this) { 7*9880d681SAndroid Build Coastguard Worker %adj = getelementptr i8, i8* %this, i32 4 8*9880d681SAndroid Build Coastguard Worker musttail call x86_thiscallcc void @t1_callee(i8* %adj) 9*9880d681SAndroid Build Coastguard Worker ret void 10*9880d681SAndroid Build Coastguard Worker} 11*9880d681SAndroid Build Coastguard Workerdeclare x86_thiscallcc void @t1_callee(i8* %this) 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t2: 14*9880d681SAndroid Build Coastguard Worker; CHECK: jmp {{_?}}t2_callee 15*9880d681SAndroid Build Coastguard Workerdefine x86_thiscallcc i32 @t2(i8* %this, i32 %a) { 16*9880d681SAndroid Build Coastguard Worker %adj = getelementptr i8, i8* %this, i32 4 17*9880d681SAndroid Build Coastguard Worker %rv = musttail call x86_thiscallcc i32 @t2_callee(i8* %adj, i32 %a) 18*9880d681SAndroid Build Coastguard Worker ret i32 %rv 19*9880d681SAndroid Build Coastguard Worker} 20*9880d681SAndroid Build Coastguard Workerdeclare x86_thiscallcc i32 @t2_callee(i8* %this, i32 %a) 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t3: 23*9880d681SAndroid Build Coastguard Worker; CHECK: jmp {{_?}}t3_callee 24*9880d681SAndroid Build Coastguard Workerdefine x86_thiscallcc i8* @t3(i8* %this, <{ i8*, i32 }>* inalloca %args) { 25*9880d681SAndroid Build Coastguard Worker %adj = getelementptr i8, i8* %this, i32 4 26*9880d681SAndroid Build Coastguard Worker %a_ptr = getelementptr <{ i8*, i32 }>, <{ i8*, i32 }>* %args, i32 0, i32 1 27*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %a_ptr 28*9880d681SAndroid Build Coastguard Worker %rv = musttail call x86_thiscallcc i8* @t3_callee(i8* %adj, <{ i8*, i32 }>* inalloca %args) 29*9880d681SAndroid Build Coastguard Worker ret i8* %rv 30*9880d681SAndroid Build Coastguard Worker} 31*9880d681SAndroid Build Coastguard Workerdeclare x86_thiscallcc i8* @t3_callee(i8* %this, <{ i8*, i32 }>* inalloca %args); 32