diff options
Diffstat (limited to 'test/CodeGen/X86/fast-isel-x86-64.ll')
-rw-r--r-- | test/CodeGen/X86/fast-isel-x86-64.ll | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/test/CodeGen/X86/fast-isel-x86-64.ll b/test/CodeGen/X86/fast-isel-x86-64.ll index c4afc10ffa..6a5a10295f 100644 --- a/test/CodeGen/X86/fast-isel-x86-64.ll +++ b/test/CodeGen/X86/fast-isel-x86-64.ll @@ -259,4 +259,27 @@ define void @test21(double* %p1) { ; CHECK: test21: ; CHECK-NOT: pxor ; CHECK: movsd LCPI -}
\ No newline at end of file +} + +; 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) |