1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=m68k-linux -verify-machineinstrs | FileCheck %s
4 define { i32, i32, i32, i32 } @test0() {
6 ; CHECK: .cfi_startproc
7 ; CHECK-NEXT: ; %bb.0: ; %start
8 ; CHECK-NEXT: move.l (4,%sp), %a0
9 ; CHECK-NEXT: move.l #23, (12,%a0)
10 ; CHECK-NEXT: move.l #19, (8,%a0)
11 ; CHECK-NEXT: move.l #17, (4,%a0)
12 ; CHECK-NEXT: move.l #13, (%a0)
13 ; CHECK-NEXT: move.l %a0, %d0
14 ; CHECK-NEXT: move.l (%sp), %a1
15 ; CHECK-NEXT: adda.l #4, %sp
16 ; CHECK-NEXT: move.l %a1, (%sp)
19 ret { i32, i32, i32, i32 } { i32 13, i32 17, i32 19, i32 23 }
22 define void @call_test0() {
23 ; CHECK-LABEL: call_test0:
24 ; CHECK: .cfi_startproc
25 ; CHECK-NEXT: ; %bb.0: ; %start
26 ; CHECK-NEXT: suba.l #20, %sp
27 ; CHECK-NEXT: .cfi_def_cfa_offset -24
28 ; CHECK-NEXT: lea (4,%sp), %a0
29 ; CHECK-NEXT: move.l %a0, (%sp)
30 ; CHECK-NEXT: jsr test0
31 ; CHECK-NEXT: adda.l #16, %sp
34 %val = call { i32, i32, i32, i32 } @test0()
38 define void @test1(ptr sret({ i32, i32, i32, i32 }) %ret_val) {
40 ; CHECK: .cfi_startproc
41 ; CHECK-NEXT: ; %bb.0: ; %start
42 ; CHECK-NEXT: move.l (4,%sp), %d0
43 ; CHECK-NEXT: move.l (%sp), %a1
44 ; CHECK-NEXT: adda.l #4, %sp
45 ; CHECK-NEXT: move.l %a1, (%sp)
51 define void @call_test1() {
52 ; CHECK-LABEL: call_test1:
53 ; CHECK: .cfi_startproc
54 ; CHECK-NEXT: ; %bb.0: ; %start
55 ; CHECK-NEXT: suba.l #20, %sp
56 ; CHECK-NEXT: .cfi_def_cfa_offset -24
57 ; CHECK-NEXT: lea (4,%sp), %a0
58 ; CHECK-NEXT: move.l %a0, (%sp)
59 ; CHECK-NEXT: jsr test1
60 ; CHECK-NEXT: adda.l #16, %sp
63 %ret_val = alloca { i32, i32, i32, i32 }
64 call void @test1(ptr %ret_val)
70 ; CHECK: .cfi_startproc
71 ; CHECK-NEXT: ; %bb.0: ; %start
72 ; CHECK-NEXT: moveq #13, %d0
78 define void @call_test2() {
79 ; CHECK-LABEL: call_test2:
80 ; CHECK: .cfi_startproc
81 ; CHECK-NEXT: ; %bb.0: ; %start
82 ; CHECK-NEXT: suba.l #4, %sp
83 ; CHECK-NEXT: .cfi_def_cfa_offset -8
84 ; CHECK-NEXT: jsr test2
85 ; CHECK-NEXT: adda.l #4, %sp
88 %0 = call i32 @test2()