From 1b5dcc34b701639f94008658a2042abc43b9b910 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 31 Aug 2007 15:06:30 +0000 Subject: Initial support for calling functions with byval arguments on x86-64 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41643 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/byval2.ll | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/CodeGen/X86/byval2.ll (limited to 'test/CodeGen/X86/byval2.ll') diff --git a/test/CodeGen/X86/byval2.ll b/test/CodeGen/X86/byval2.ll new file mode 100644 index 0000000000..04d34839c0 --- /dev/null +++ b/test/CodeGen/X86/byval2.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep rep.movsl | count 2 + +%struct.s = type { i64, i64, i64 } + +define void @g(i64 %a, i64 %b, i64 %c) { +entry: + %d = alloca %struct.s, align 16 + %tmp = getelementptr %struct.s* %d, i32 0, i32 0 + store i64 %a, i64* %tmp, align 16 + %tmp2 = getelementptr %struct.s* %d, i32 0, i32 1 + store i64 %b, i64* %tmp2, align 16 + %tmp4 = getelementptr %struct.s* %d, i32 0, i32 2 + store i64 %c, i64* %tmp4, align 16 + call void @f( %struct.s* %d byval) + call void @f( %struct.s* %d byval) + ret void +} + +declare void @f(%struct.s* byval) -- cgit v1.2.3