xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/stdcall-notailcall.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=i386-apple-darwin11 -O2 < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker%struct.I = type { i32 (...)** }
4*9880d681SAndroid Build Coastguard Workerdefine x86_stdcallcc void @bar(%struct.I* nocapture %this) ssp align 2 {
5*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: bar:
6*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: jmp
7*9880d681SAndroid Build Coastguard Worker; CHECK: retl $4
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  tail call void @foo()
10*9880d681SAndroid Build Coastguard Worker  ret void
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdefine x86_thiscallcc void @test2(%struct.I*  %this, i32 %a) {
14*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test2:
15*9880d681SAndroid Build Coastguard Worker; CHECK: calll _foo
16*9880d681SAndroid Build Coastguard Worker; CHECK: retl $4
17*9880d681SAndroid Build Coastguard Worker  tail call void @foo()
18*9880d681SAndroid Build Coastguard Worker  ret void
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Workerdeclare void @foo()
22