NAKAMURA Takumi | 4491aa4 | 2011-03-16 13:52:20 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck -check-prefix=X86-64 %s |
| 2 | ; Win64 has not supported byval yet. |
Eric Christopher | 8f9145b | 2010-10-12 23:47:58 +0000 | [diff] [blame] | 3 | ; RUN: llc < %s -march=x86 | FileCheck -check-prefix=X86 %s |
| 4 | |
| 5 | ; X86: movl 4(%esp), %eax |
| 6 | ; X86: movl 8(%esp), %edx |
| 7 | |
| 8 | ; X86-64: movq 8(%rsp), %rax |
Rafael Espindola | 24eb92e | 2007-08-16 13:09:02 +0000 | [diff] [blame] | 9 | |
| 10 | %struct.s = type { i64, i64, i64 } |
| 11 | |
| 12 | define i64 @f(%struct.s* byval %a) { |
| 13 | entry: |
| 14 | %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0 |
| 15 | %tmp3 = load i64* %tmp2, align 8 |
| 16 | ret i64 %tmp3 |
| 17 | } |