summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-05-20 22:21:04 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-05-20 22:21:04 +0000
commitc088345f1377a36c35c037be63830d0e6892f904 (patch)
tree430fecdd4ebe24c32e0497f3e232da56ef64b65b /test/CodeGen/X86
parentf3ffc2cd76267b7901088ec5e46e875a2701bda9 (diff)
downloadllvm-c088345f1377a36c35c037be63830d0e6892f904.tar.gz
llvm-c088345f1377a36c35c037be63830d0e6892f904.tar.bz2
llvm-c088345f1377a36c35c037be63830d0e6892f904.tar.xz
Add fast-isel support for byval calls on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r--test/CodeGen/X86/fast-isel-call.ll22
1 files changed, 19 insertions, 3 deletions
diff --git a/test/CodeGen/X86/fast-isel-call.ll b/test/CodeGen/X86/fast-isel-call.ll
index f5fcf1ea1b..7e57965bb5 100644
--- a/test/CodeGen/X86/fast-isel-call.ll
+++ b/test/CodeGen/X86/fast-isel-call.ll
@@ -1,6 +1,8 @@
-; RUN: llc < %s -fast-isel -march=x86 | FileCheck %s
+; RUN: llc < %s -O0 -fast-isel-abort -march=x86 | FileCheck %s
-define i32 @t() nounwind {
+%struct.s = type {i32, i32, i32}
+
+define i32 @test1() nounwind {
tak:
%tmp = call i1 @foo()
br i1 %tmp, label %BB1, label %BB2
@@ -8,8 +10,22 @@ BB1:
ret i32 1
BB2:
ret i32 0
+; CHECK: test1:
; CHECK: calll
; CHECK-NEXT: testb $1
}
-
declare i1 @foo() zeroext nounwind
+
+declare void @foo2(%struct.s* byval)
+
+define void @test2(%struct.s* %d) nounwind {
+ call void @foo2(%struct.s* %d byval)
+ ret void
+; CHECK: test2:
+; CHECK: movl (%eax)
+; CHECK: movl {{.*}}, (%esp)
+; CHECK: movl 4(%eax)
+; CHECK: movl {{.*}}, 4(%esp)
+; CHECK: movl 8(%eax)
+; CHECK: movl {{.*}}, 8(%esp)
+}