Michael Liao | d8faa61 | 2014-12-04 00:56:38 +0000 | [diff] [blame] | 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 |
| 3 | |
| 4 | target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
| 5 | |
| 6 | %Foo = type { [125 x i8] } |
| 7 | |
| 8 | declare i32 @llvm.eh.sjlj.setjmp(i8*) nounwind |
| 9 | |
| 10 | declare void @whatever(i64, %Foo*, i8**, i8*, i8*, i32) #0 |
| 11 | |
| 12 | attributes #0 = { nounwind uwtable "no-frame-pointer-elim"="true" } |
| 13 | |
| 14 | define i32 @test1(i64 %n, %Foo* byval nocapture readnone align 8 %f) #0 { |
| 15 | entry: |
| 16 | %buf = alloca [5 x i8*], align 16 |
| 17 | %p = alloca i8*, align 8 |
| 18 | %q = alloca i8, align 64 |
| 19 | %r = bitcast [5 x i8*]* %buf to i8* |
| 20 | %s = alloca i8, i64 %n, align 1 |
| 21 | store i8* %s, i8** %p, align 8 |
| 22 | %t = call i32 @llvm.eh.sjlj.setjmp(i8* %s) |
| 23 | call void @whatever(i64 %n, %Foo* %f, i8** %p, i8* %q, i8* %s, i32 %t) #1 |
| 24 | ret i32 0 |
| 25 | ; X86: movl %esp, %esi |
| 26 | ; X86: movl %esp, -16(%ebp) |
| 27 | ; X86: {{.LBB.*:}} |
| 28 | ; X86: movl -16(%ebp), %esi |
| 29 | ; X86: {{.LBB.*:}} |
| 30 | ; X64: movq %rsp, %rbx |
| 31 | ; X64: movq %rsp, -48(%rbp) |
| 32 | ; X64: {{.LBB.*:}} |
| 33 | ; X64: movq -48(%rbp), %rbx |
| 34 | ; X64: {{.LBB.*:}} |
| 35 | } |
| 36 | |
| 37 | |