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

Unified 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, 5 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 side-by-side diff with in-line comments
Download patch
« lib/Target/X86/X86FastISel.cpp ('K') | « lib/Target/X86/X86FastISel.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/CodeGen/X86/fast-isel-call-x86-64.ll
===================================================================
--- test/CodeGen/X86/fast-isel-call-x86-64.ll (revision 0)
+++ test/CodeGen/X86/fast-isel-call-x86-64.ll (revision 0)
@@ -0,0 +1,56 @@
+; RUN: llc < %s -O0 -fast-isel-abort -march=x86-64 | FileCheck %s
+
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.
+%struct.s = type {i32, i32, i32}
+
+define i32 @test1() nounwind {
+tak:
+ %tmp = call i1 @foo()
+ br i1 %tmp, label %BB1, label %BB2
+BB1:
+ ret i32 1
+BB2:
+ ret i32 0
+; CHECK: test1:
+; CHECK: callq
+; CHECK-NEXT: testb $1
+}
+declare zeroext i1 @foo() nounwind
+
+declare void @foo2(%struct.s* byval)
+
+define void @test2(%struct.s* %d) nounwind {
+ call void @foo2(%struct.s* byval %d )
+ ret void
+
+; CHECK: test2:
+; CHECK: subq $24, %rsp
+; CHECK: movq (%rdi), %rax
+; CHECK: movq %rax, (%rsp)
+; CHECK: movl 8(%rdi), %ecx
+; CHECK: movl %ecx, 8(%rsp)
+; CHECK: callq foo2
+; CHECK: addq $24, %rsp
+; CHECK: ret
+}
+
+define void @test5() nounwind {
+entry:
+ call void @foo5(i32 0)
+ call void @foo5(i32 1)
+ call void @foo5(i32 2)
+ call void @foo5(i32 3)
+ ret void
+; CHECK: test5:
+; CHECK: movl $0, %edi
+; CHECK: callq foo5
+; CHECK: movl $1, %edi
+; CHECK: callq foo5
+; CHECK: movl $2, %edi
+; CHECK: callq foo5
+; CHECK: movl $3, %edi
+; CHECK: callq foo5
+; CHECK: popq %rax
+; CHECK: ret
+}
+
+declare void @foo5(i32)
« 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