• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=i686-win32 | FileCheck %s
2
3; Previously we would forget to align to stack slot alignment after placing a
4; byval argument.  Subsequent arguments would align themselves, but if it was
5; the last argument, the argument size would not be a multiple of stack slot
6; size. This resulted in retl $6 in callee-cleanup functions, as well as subtle
7; varargs bugs.
8
9%struct.Six = type { [6 x i8] }
10
11define x86_stdcallcc void @f(%struct.Six* byval(%struct.Six) %a) {
12  ret void
13}
14; CHECK-LABEL: _f@8:
15; CHECK: retl $8
16
17define x86_thiscallcc void @g(i8* %this, %struct.Six* byval(%struct.Six) %a) {
18  ret void
19}
20; CHECK-LABEL: _g:
21; CHECK: retl $8
22
23define x86_fastcallcc void @h(i32 inreg %x, i32 inreg %y, %struct.Six* byval(%struct.Six) %a) {
24  ret void
25}
26; CHECK-LABEL: @h@16:
27; CHECK: retl $8
28