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 declare x86_stdcallcc void @f(%Foo* inalloca %a)
      6 declare x86_stdcallcc void @i(i32 %a)
      7 
      8 define void @g() {
      9   %b = alloca inalloca %Foo
     10 ; CHECK: movl    $8, %eax
     11 ; CHECK: calll   __chkstk
     12 ; CHECK: movl   %[[REG:[^,]*]], %esp
     13   %f1 = getelementptr %Foo* %b, i32 0, i32 0
     14   %f2 = getelementptr %Foo* %b, i32 0, i32 1
     15   store i32 13, i32* %f1
     16   store i32 42, i32* %f2
     17 ; CHECK: movl    $13, (%[[REG]])
     18 ; CHECK: movl    $42, 4(%[[REG]])
     19   call x86_stdcallcc void @f(%Foo* inalloca %b)
     20 ; CHECK: calll   _f@8
     21 ; CHECK-NOT: %esp
     22 ; CHECK: subl $4, %esp
     23 ; CHECK: calll   _i@4
     24   call x86_stdcallcc void @i(i32 0)
     25   ret void
     26 }
     27