1 ; RUN: llc < %s -mtriple=i386-pc-linux -mcpu=corei7 -relocation-model=static | FileCheck --check-prefix=X86 %s
2 ; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=corei7 -relocation-model=static | FileCheck --check-prefix=X64 %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 %Foo = type { [125 x i8] }
8 declare i32 @llvm.eh.sjlj.setjmp(ptr) nounwind
10 declare void @whatever(i64, ptr, ptr, ptr, ptr, i32) #0
12 attributes #0 = { nounwind uwtable "frame-pointer"="all" }
14 define i32 @test1(i64 %n, ptr byval(%Foo) nocapture readnone align 8 %f) #0 {
16 %buf = alloca [5 x ptr], align 16
17 %p = alloca ptr, align 8
18 %q = alloca i8, align 64
19 %s = alloca i8, i64 %n, align 1
20 store ptr %s, ptr %p, align 8
21 %t = call i32 @llvm.eh.sjlj.setjmp(ptr %s)
22 call void @whatever(i64 %n, ptr %f, ptr %p, ptr %q, ptr %s, i32 %t) #1
25 ; X86-NEXT: pushl %esi
26 ; X86: movl %esp, %esi
27 ; X86: movl %esp, -16(%ebp)
29 ; X86: movl -16(%ebp), %esi
34 ; X64-NEXT: pushq %rbx
35 ; X64: movq %rsp, %rbx
36 ; X64: movq %rsp, -48(%rbp)
38 ; X64: movq -48(%rbp), %rbx