1 ; RUN: llc -mtriple=i686-windows-msvc -O1 < %s | FileCheck %s
2 ; RUN: llc -mtriple=i686-windows-msvc -O0 < %s | FileCheck %s
4 ; The MSVC family of x86 calling conventions makes tail calls really tricky.
5 ; Tests of all the various combinations should live here.
7 declare i32 @cdecl_i32()
8 declare void @cdecl_void()
10 ; Don't allow tail calling these cdecl functions, because we need to clear the
11 ; incoming stack arguments for these argument-clearing conventions.
13 define x86_thiscallcc void @thiscall_cdecl_notail(i32 %a, i32 %b, i32 %c) {
14 tail call void @cdecl_void()
17 ; CHECK-LABEL: thiscall_cdecl_notail: # @thiscall_cdecl_notail
18 ; CHECK: calll _cdecl_void
20 define x86_stdcallcc void @stdcall_cdecl_notail(i32 %a, i32 %b, i32 %c) {
21 tail call void @cdecl_void()
24 ; CHECK-LABEL: _stdcall_cdecl_notail@12: # @stdcall_cdecl_notail
25 ; CHECK: calll _cdecl_void
27 define x86_vectorcallcc void @vectorcall_cdecl_notail(i32 inreg %a, i32 inreg %b, i32 %c) {
28 tail call void @cdecl_void()
31 ; CHECK-LABEL: vectorcall_cdecl_notail@@12: # @vectorcall_cdecl_notail
32 ; CHECK: calll _cdecl_void
34 define x86_fastcallcc void @fastcall_cdecl_notail(i32 inreg %a, i32 inreg %b, i32 %c) {
35 tail call void @cdecl_void()
38 ; CHECK-LABEL: @fastcall_cdecl_notail@12: # @fastcall_cdecl_notail
39 ; CHECK: calll _cdecl_void