1 ; RUN: llc -mcpu=generic -mtriple=i686-pc-windows-msvc -mattr=+sse < %s | FileCheck %s
3 ; Check proper alignment of spilled vector
5 ; CHECK-LABEL: spill_ok
6 ; CHECK: subl $32, %esp
7 ; CHECK: movups %xmm3, (%esp)
8 ; CHECK: movl $0, 16(%esp)
10 define void @spill_ok(i32, ptr) {
12 %2 = alloca i32, i32 %0
13 %3 = load <16 x float>, ptr %1, align 64
14 tail call void @bar(<16 x float> %3, i32 0) nounwind
18 declare void @bar(<16 x float> %a, i32 %b)
20 ; Check that proper alignment of spilled vector does not affect vargs
22 ; CHECK-LABEL: vargs_not_affected
23 ; CHECK: movl 28(%esp), %eax
24 define i32 @vargs_not_affected(<4 x float> %v, ptr %f, ...) {
26 %ap = alloca ptr, align 4
27 call void @llvm.va_start(ptr %ap)
28 %argp.cur = load ptr, ptr %ap, align 4
29 %argp.next = getelementptr inbounds i8, ptr %argp.cur, i32 4
30 store ptr %argp.next, ptr %ap, align 4
31 %0 = load i32, ptr %argp.cur, align 4
32 call void @llvm.va_end(ptr %ap)
36 declare void @llvm.va_start(ptr)
38 declare void @llvm.va_end(ptr)