1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_sp --version 2
2 ; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
4 define void @caller() nounwind {
7 ; CHECK-NEXT: pushq %rax
8 ; CHECK-NEXT: subq $8, %rsp
9 ; CHECK-NEXT: xorl %edi, %edi
10 ; CHECK-NEXT: xorl %esi, %esi
11 ; CHECK-NEXT: xorl %edx, %edx
12 ; CHECK-NEXT: xorl %ecx, %ecx
13 ; CHECK-NEXT: xorl %r8d, %r8d
14 ; CHECK-NEXT: xorl %r9d, %r9d
15 ; CHECK-NEXT: pushq $42
16 ; CHECK-NEXT: pushq $42
17 ; CHECK-NEXT: pushq $42
18 ; CHECK-NEXT: pushq $42
19 ; CHECK-NEXT: pushq $42
20 ; CHECK-NEXT: pushq $42
21 ; CHECK-NEXT: pushq $42
22 ; CHECK-NEXT: callq callee@PLT
23 ; CHECK-NEXT: addq $64, %rsp
24 ; CHECK-NEXT: popq %rax
26 call void @callee(ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, <7 x i32> <i32 42, i32 42, i32 42, i32 42, i32 42, i32 42, i32 42>)
30 ; Make sure the stack offsets are correct. The distance between them should
32 define void @callee(ptr %p0, ptr %p1, ptr %p2, ptr %p3, ptr %p4, ptr %p5, <7 x i32> %arg) nounwind {
33 ; CHECK-LABEL: callee:
34 ; CHECK: # %bb.0: # %start
35 ; CHECK-NEXT: pushq %rbp
36 ; CHECK-NEXT: pushq %r15
37 ; CHECK-NEXT: pushq %r14
38 ; CHECK-NEXT: pushq %r13
39 ; CHECK-NEXT: pushq %r12
40 ; CHECK-NEXT: pushq %rbx
41 ; CHECK-NEXT: subq $40, %rsp
42 ; CHECK-NEXT: movl 120(%rsp), %ebx
43 ; CHECK-NEXT: movd %ebx, %xmm0
44 ; CHECK-NEXT: movl 112(%rsp), %ebp
45 ; CHECK-NEXT: movd %ebp, %xmm1
46 ; CHECK-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
47 ; CHECK-NEXT: movl 104(%rsp), %r15d
48 ; CHECK-NEXT: movd %r15d, %xmm0
49 ; CHECK-NEXT: movl 96(%rsp), %edi
50 ; CHECK-NEXT: movd %edi, %xmm2
51 ; CHECK-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
52 ; CHECK-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm1[0]
53 ; CHECK-NEXT: movl 136(%rsp), %r14d
54 ; CHECK-NEXT: movd %r14d, %xmm0
55 ; CHECK-NEXT: movl 128(%rsp), %r12d
56 ; CHECK-NEXT: movd %r12d, %xmm1
57 ; CHECK-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
58 ; CHECK-NEXT: movl 144(%rsp), %r13d
59 ; CHECK-NEXT: movl %r13d, 36(%rsp)
60 ; CHECK-NEXT: movq %xmm1, 28(%rsp)
61 ; CHECK-NEXT: movdqu %xmm2, 12(%rsp)
62 ; CHECK-NEXT: callq use@PLT
63 ; CHECK-NEXT: movl %r15d, %edi
64 ; CHECK-NEXT: callq use@PLT
65 ; CHECK-NEXT: movl %ebp, %edi
66 ; CHECK-NEXT: callq use@PLT
67 ; CHECK-NEXT: movl %ebx, %edi
68 ; CHECK-NEXT: callq use@PLT
69 ; CHECK-NEXT: movl %r12d, %edi
70 ; CHECK-NEXT: callq use@PLT
71 ; CHECK-NEXT: movl %r14d, %edi
72 ; CHECK-NEXT: callq use@PLT
73 ; CHECK-NEXT: movl %r13d, %edi
74 ; CHECK-NEXT: callq use@PLT
75 ; CHECK-NEXT: addq $40, %rsp
76 ; CHECK-NEXT: popq %rbx
77 ; CHECK-NEXT: popq %r12
78 ; CHECK-NEXT: popq %r13
79 ; CHECK-NEXT: popq %r14
80 ; CHECK-NEXT: popq %r15
81 ; CHECK-NEXT: popq %rbp
84 %alloca = alloca [7 x i32], align 4
85 store <7 x i32> %arg, ptr %alloca, align 4
86 %extract0 = extractelement <7 x i32> %arg, i64 0
87 call void @use(i32 %extract0)
88 %extract1 = extractelement <7 x i32> %arg, i64 1
89 call void @use(i32 %extract1)
90 %extract2 = extractelement <7 x i32> %arg, i64 2
91 call void @use(i32 %extract2)
92 %extract3 = extractelement <7 x i32> %arg, i64 3
93 call void @use(i32 %extract3)
94 %extract4 = extractelement <7 x i32> %arg, i64 4
95 call void @use(i32 %extract4)
96 %extract5 = extractelement <7 x i32> %arg, i64 5
97 call void @use(i32 %extract5)
98 %extract6 = extractelement <7 x i32> %arg, i64 6
99 call void @use(i32 %extract6)
103 declare void @use(i32)