2014-01-31 23:50:57 +00:00
|
|
|
; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s
|
|
|
|
|
|
|
|
%Foo = type { i32, i32 }
|
|
|
|
|
|
|
|
declare x86_stdcallcc void @f(%Foo* inalloca %a)
|
|
|
|
declare x86_stdcallcc void @i(i32 %a)
|
|
|
|
|
|
|
|
define void @g() {
|
2014-03-09 06:41:58 +00:00
|
|
|
%b = alloca inalloca %Foo
|
2014-01-31 23:50:57 +00:00
|
|
|
; CHECK: movl $8, %eax
|
|
|
|
; CHECK: calll __chkstk
|
|
|
|
; CHECK: movl %[[REG:[^,]*]], %esp
|
|
|
|
%f1 = getelementptr %Foo* %b, i32 0, i32 0
|
|
|
|
%f2 = getelementptr %Foo* %b, i32 0, i32 1
|
|
|
|
store i32 13, i32* %f1
|
|
|
|
store i32 42, i32* %f2
|
|
|
|
; CHECK: movl $13, (%[[REG]])
|
|
|
|
; CHECK: movl $42, 4(%[[REG]])
|
|
|
|
call x86_stdcallcc void @f(%Foo* inalloca %b)
|
|
|
|
; CHECK: calll _f@8
|
|
|
|
; CHECK-NOT: %esp
|
2014-12-09 06:10:44 +00:00
|
|
|
; CHECK: pushl
|
2014-01-31 23:50:57 +00:00
|
|
|
; CHECK: calll _i@4
|
|
|
|
call x86_stdcallcc void @i(i32 0)
|
|
|
|
ret void
|
|
|
|
}
|