1 ; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s -check-prefix=WIN_X32 2 ; RUN: llc < %s -mtriple=i686-pc-mingw32 | FileCheck %s -check-prefix=MINGW_X32 3 ; RUN: llc < %s -mtriple=i386-pc-linux | FileCheck %s -check-prefix=LINUX 4 ; RUN: llc < %s -O0 -mtriple=i686-pc-win32 | FileCheck %s -check-prefix=WIN_X32 5 ; RUN: llc < %s -O0 -mtriple=i686-pc-mingw32 | FileCheck %s -check-prefix=MINGW_X32 6 ; RUN: llc < %s -O0 -mtriple=i386-pc-linux | FileCheck %s -check-prefix=LINUX 7 8 ; The SysV ABI used by most Unixes and Mingw on x86 specifies that an sret pointer 9 ; is callee-cleanup. However, in MSVC's cdecl calling convention, sret pointer 10 ; arguments are caller-cleanup like normal arguments. 11 12 define void @sret1(i8* sret) nounwind { 13 entry: 14 ; WIN_X32: {{ret$}} 15 ; MINGW_X32: ret $4 16 ; LINUX: ret $4 17 ret void 18 } 19 20 define void @sret2(i32* sret %x, i32 %y) nounwind { 21 entry: 22 ; WIN_X32: {{ret$}} 23 ; MINGW_X32: ret $4 24 ; LINUX: ret $4 25 store i32 %y, i32* %x 26 ret void 27 } 28 29