Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s
      2 
      3 %Foo = type { i32, i32 }
      4 
      5 %frame = type { %Foo, i32, %Foo }
      6 
      7 declare void @f(%frame* inalloca %a)
      8 
      9 declare void @Foo_ctor(%Foo* %this)
     10 
     11 define void @g() {
     12 entry:
     13   %args = alloca inalloca %frame
     14   %c = getelementptr %frame, %frame* %args, i32 0, i32 2
     15 ; CHECK: movl    $20, %eax
     16 ; CHECK: calll   __chkstk
     17 ; CHECK: movl %esp,
     18   call void @Foo_ctor(%Foo* %c)
     19 ; CHECK: leal 12(%{{.*}}),
     20 ; CHECK-NEXT: pushl
     21 ; CHECK-NEXT: calll _Foo_ctor
     22 ; CHECK: addl $4, %esp
     23   %b = getelementptr %frame, %frame* %args, i32 0, i32 1
     24   store i32 42, i32* %b
     25 ; CHECK: movl $42,
     26   %a = getelementptr %frame, %frame* %args, i32 0, i32 0
     27   call void @Foo_ctor(%Foo* %a)
     28 ; CHECK-NEXT: pushl
     29 ; CHECK-NEXT: calll _Foo_ctor
     30 ; CHECK: addl $4, %esp
     31   call void @f(%frame* inalloca %args)
     32 ; CHECK: calll   _f
     33   ret void
     34 }
     35