diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-23 23:17:41 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-23 23:17:41 +0000 |
commit | 5a67b819a91592a2e433c2db36481dd7d6ee7bf6 (patch) | |
tree | ef8b23bf5acebabc33fea3c8928a9f83b85ddeae /test/CodeGen/X86/byval7.ll | |
parent | 7e520b50509cf5f80d294f4ebcc08ae27590a4ee (diff) | |
download | external_llvm-5a67b819a91592a2e433c2db36481dd7d6ee7bf6.zip external_llvm-5a67b819a91592a2e433c2db36481dd7d6ee7bf6.tar.gz external_llvm-5a67b819a91592a2e433c2db36481dd7d6ee7bf6.tar.bz2 |
Let each target decide byval alignment. For X86, it's 4-byte unless the aggregare contains SSE vector(s). For x86-64, it's max of 8 or alignment of the type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/byval7.ll')
-rw-r--r-- | test/CodeGen/X86/byval7.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/byval7.ll b/test/CodeGen/X86/byval7.ll new file mode 100644 index 0000000..54210c8 --- /dev/null +++ b/test/CodeGen/X86/byval7.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep add | grep 16 + + %struct.S = type { <2 x i64> } + +define i32 @main() nounwind { +entry: + %s = alloca %struct.S ; <%struct.S*> [#uses=2] + %tmp15 = getelementptr %struct.S* %s, i32 0, i32 0 ; <<2 x i64>*> [#uses=1] + store <2 x i64> < i64 8589934595, i64 1 >, <2 x i64>* %tmp15, align 16 + call void @t( i32 1, %struct.S* byval %s ) nounwind + ret i32 0 +} + +declare void @t(i32, %struct.S* byval ) |