1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-pc-windows-msvc | FileCheck %s
4 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
5 target triple = "i386-pc-windows-msvc"
7 %struct._param_str = type { i32, i32, [4096 x i32], i32 }
9 @g_d = common dso_local local_unnamed_addr global i32 0, align 4
10 @g_c = common dso_local local_unnamed_addr global i32 0, align 4
11 @g_b = common dso_local local_unnamed_addr global i32 0, align 4
12 @g_a = common dso_local local_unnamed_addr global i32 0, align 4
13 @g_param = common dso_local global %struct._param_str zeroinitializer, align 4
15 ; Function Attrs: nounwind
16 define dso_local i32 @test() local_unnamed_addr {
18 ; CHECK: # %bb.0: # %entry
19 ; CHECK-NEXT: pushl %edi
20 ; CHECK-NEXT: pushl %esi
21 ; CHECK-NEXT: movl $16396, %eax # imm = 0x400C
22 ; CHECK-NEXT: calll __chkstk
23 ; CHECK-NEXT: movl _g_d, %eax
24 ; CHECK-NEXT: movl _g_c, %ecx
25 ; CHECK-NEXT: movl _g_b, %edx
26 ; CHECK-NEXT: movl _g_a, %esi
27 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
28 ; CHECK-NEXT: movl %ecx, {{[0-9]+}}(%esp)
29 ; CHECK-NEXT: movl %edx, {{[0-9]+}}(%esp)
30 ; CHECK-NEXT: movl %esi, (%esp)
31 ; CHECK-NEXT: calll _bar
32 ; CHECK-NEXT: movl $4099, %ecx # imm = 0x1003
33 ; CHECK-NEXT: movl %esp, %edi
34 ; CHECK-NEXT: movl $_g_param, %esi
35 ; CHECK-NEXT: rep;movsl (%esi), %es:(%edi)
36 ; CHECK-NEXT: calll _foo
37 ; CHECK-NEXT: xorl %eax, %eax
38 ; CHECK-NEXT: addl $16396, %esp # imm = 0x400C
39 ; CHECK-NEXT: popl %esi
40 ; CHECK-NEXT: popl %edi
43 %0 = load i32, i32* @g_d, align 4, !tbaa !3
44 %1 = load i32, i32* @g_c, align 4, !tbaa !3
45 %2 = load i32, i32* @g_b, align 4, !tbaa !3
46 %3 = load i32, i32* @g_a, align 4, !tbaa !3
47 %call = tail call i32 @bar(i32 %3, i32 %2, i32 %1, i32 %0) #2
48 tail call void @foo(%struct._param_str* byval nonnull align 4 @g_param) #2
52 declare dso_local i32 @bar(i32, i32, i32, i32) local_unnamed_addr
54 declare dso_local void @foo(%struct._param_str* byval align 4) local_unnamed_addr
57 !4 = !{!"int", !5, i64 0}
58 !5 = !{!"omnipotent char", !6, i64 0}
59 !6 = !{!"Simple C/C++ TBAA"}