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

Unified Diff: test/CodeGen/X86/fast-isel-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: fix several typos 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
« no previous file with comments | « 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-x86-64.ll
===================================================================
--- test/CodeGen/X86/fast-isel-x86-64.ll (revision 136701)
+++ test/CodeGen/X86/fast-isel-x86-64.ll (working copy)
@@ -259,4 +259,27 @@
; CHECK: test21:
; CHECK-NOT: pxor
; CHECK: movsd LCPI
-}
+}
+
+; Check that immediate arguments to a function
+; do not cause massive spilling and are used
+; as immediates just before the call.
+define void @test22() nounwind {
+entry:
+ call void @foo22(i32 0)
+ call void @foo22(i32 1)
+ call void @foo22(i32 2)
+ call void @foo22(i32 3)
+ ret void
+; CHECK: test22:
+; CHECK: movl $0, %edi
+; CHECK: callq _foo22
+; CHECK: movl $1, %edi
+; CHECK: callq _foo22
+; CHECK: movl $2, %edi
+; CHECK: callq _foo22
+; CHECK: movl $3, %edi
+; CHECK: callq _foo22
+}
+
+declare void @foo22(i32)
« no previous file with comments | « lib/Target/X86/X86FastISel.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698