28 lines · plain
1; RUN: llc < %s -mtriple=i686-win32 | FileCheck %s2 3; Previously we would forget to align to stack slot alignment after placing a4; byval argument. Subsequent arguments would align themselves, but if it was5; the last argument, the argument size would not be a multiple of stack slot6; size. This resulted in retl $6 in callee-cleanup functions, as well as subtle7; varargs bugs.8 9%struct.Six = type { [6 x i8] }10 11define x86_stdcallcc void @f(ptr byval(%struct.Six) %a) {12 ret void13}14; CHECK-LABEL: _f@8:15; CHECK: retl $816 17define x86_thiscallcc void @g(ptr %this, ptr byval(%struct.Six) %a) {18 ret void19}20; CHECK-LABEL: _g:21; CHECK: retl $822 23define x86_fastcallcc void @h(i32 inreg %x, i32 inreg %y, ptr byval(%struct.Six) %a) {24 ret void25}26; CHECK-LABEL: @h@16:27; CHECK: retl $828