Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Side by Side Diff: test/CodeGen/X86/fast-isel-call-x86-64.ll

Issue 7539010: Emit immediate call arguments locally to save stack size when compiling with -O0 (Closed) Base URL: http://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: Remove an empty line Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 ; RUN: llc < %s -O0 -fast-isel-abort -march=x86-64 | FileCheck %s
2
nlewycky 2011/08/01 20:49:28 Please add a comment that you'd like this to be fo
krasin 2011/08/01 20:55:37 Done.
3 %struct.s = type {i32, i32, i32}
4
5 define i32 @test1() nounwind {
6 tak:
7 %tmp = call i1 @foo()
8 br i1 %tmp, label %BB1, label %BB2
9 BB1:
10 ret i32 1
11 BB2:
12 ret i32 0
13 ; CHECK: test1:
14 ; CHECK: callq
15 ; CHECK-NEXT: testb $1
16 }
17 declare zeroext i1 @foo() nounwind
18
19 declare void @foo2(%struct.s* byval)
20
21 define void @test2(%struct.s* %d) nounwind {
22 call void @foo2(%struct.s* byval %d )
23 ret void
24
25 ; CHECK: test2:
26 ; CHECK: subq $24, %rsp
27 ; CHECK: movq (%rdi), %rax
28 ; CHECK: movq %rax, (%rsp)
29 ; CHECK: movl 8(%rdi), %ecx
30 ; CHECK: movl %ecx, 8(%rsp)
31 ; CHECK: callq foo2
32 ; CHECK: addq $24, %rsp
33 ; CHECK: ret
34 }
35
36 define void @test5() nounwind {
37 entry:
38 call void @foo5(i32 0)
39 call void @foo5(i32 1)
40 call void @foo5(i32 2)
41 call void @foo5(i32 3)
42 ret void
43 ; CHECK: test5:
44 ; CHECK: movl $0, %edi
45 ; CHECK: callq foo5
46 ; CHECK: movl $1, %edi
47 ; CHECK: callq foo5
48 ; CHECK: movl $2, %edi
49 ; CHECK: callq foo5
50 ; CHECK: movl $3, %edi
51 ; CHECK: callq foo5
52 ; CHECK: popq %rax
53 ; CHECK: ret
54 }
55
56 declare void @foo5(i32)
OLDNEW
« lib/Target/X86/X86FastISel.cpp ('K') | « lib/Target/X86/X86FastISel.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698