xref: /llvm-project/llvm/test/CodeGen/X86/x86-64-sret-return-2.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc -mtriple=x86_64-apple-darwin8 < %s | FileCheck %s
2; RUN: llc -mtriple=x86_64-pc-linux < %s | FileCheck %s
3
4; FIXME: x32 doesn't know how to select this.  This isn't a regression, it never
5; worked.
6; RUNX: llc -mtriple=x86_64-pc-linux-gnux32 < %s | FileCheck -check-prefix=X32ABI %s
7
8; This used to crash due to topological sorting issues in selection DAG.
9define void @foo(ptr sret(i32) %agg.result, i32, i32, i32, i32, i32, ptr %pred) {
10entry:
11  call void %pred(i32 undef)
12  ret void
13
14; CHECK-LABEL: foo:
15; CHECK: callq
16; CHECK: movq {{.*}}, %rax
17; CHECK: ret
18}
19