Home | History | Annotate | Download | only in X86
      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 
     11 define x86_stdcallcc void @f(%struct.Six* byval %a) {
     12   ret void
     13 }
     14 ; CHECK-LABEL: _f@8:
     15 ; CHECK: retl $8
     16 
     17 define x86_thiscallcc void @g(i8* %this, %struct.Six* byval %a) {
     18   ret void
     19 }
     20 ; CHECK-LABEL: _g:
     21 ; CHECK: retl $8
     22 
     23 define x86_fastcallcc void @h(i32 inreg %x, i32 inreg %y, %struct.Six* byval %a) {
     24   ret void
     25 }
     26 ; CHECK-LABEL: @h@16:
     27 ; CHECK: retl $8
     28