1 ; Test multiple return values (LLVM ABI extension)
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -mattr=soft-float \
5 ; RUN: | FileCheck %s --check-prefix=SOFT-FLOAT
7 ; Up to eight vector return values fit into VRs.
8 define { <2 x double>, <2 x double>, <2 x double>, <2 x double>,
9 <2 x double>, <2 x double>, <2 x double>, <2 x double> } @f1() {
11 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
12 ; CHECK: vl %v24, 0([[TMP]])
13 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
14 ; CHECK: vl %v26, 0([[TMP]])
15 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
16 ; CHECK: vl %v28, 0([[TMP]])
17 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
18 ; CHECK: vl %v30, 0([[TMP]])
19 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
20 ; CHECK: vl %v25, 0([[TMP]])
21 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
22 ; CHECK: vl %v27, 0([[TMP]])
23 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
24 ; CHECK: vl %v29, 0([[TMP]])
25 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
26 ; CHECK: vl %v31, 0([[TMP]])
29 ; SOFT-FLOAT-LABEL: f1:
30 ; SOFT-FLOAT-NOT: %{{[fv]}}
32 ; SOFT-FLOAT-NEXT: oilf
33 ; SOFT-FLOAT-NEXT: stg
34 ; SOFT-FLOAT-NEXT: llihh
35 ; SOFT-FLOAT-NEXT: stg
36 ; SOFT-FLOAT-NEXT: llihf
37 ; SOFT-FLOAT-NOT: %{{[fv]}}
39 ret { <2 x double>, <2 x double>, <2 x double>, <2 x double>,
40 <2 x double>, <2 x double>, <2 x double>, <2 x double> }
41 { <2 x double> <double 1.0, double 1.1>,
42 <2 x double> <double 2.0, double 2.1>,
43 <2 x double> <double 3.0, double 3.1>,
44 <2 x double> <double 4.0, double 4.1>,
45 <2 x double> <double 5.0, double 5.1>,
46 <2 x double> <double 6.0, double 6.1>,
47 <2 x double> <double 7.0, double 7.1>,
48 <2 x double> <double 8.0, double 8.1> }
51 ; More than eight vector return values use sret.
52 define { <2 x double>, <2 x double>, <2 x double>, <2 x double>,
53 <2 x double>, <2 x double>, <2 x double>, <2 x double>,
54 <2 x double> } @f2() {
56 ; CHECK: larl [[TMP:%r[0-5]]], .LCPI
57 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
58 ; CHECK-DAG: vst [[VTMP]], 128(%r2)
59 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
60 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
61 ; CHECK-DAG: vst [[VTMP]], 112(%r2)
62 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
63 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
64 ; CHECK-DAG: vst [[VTMP]], 96(%r2)
65 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
66 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
67 ; CHECK-DAG: vst [[VTMP]], 80(%r2)
68 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
69 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
70 ; CHECK-DAG: vst [[VTMP]], 64(%r2)
71 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
72 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
73 ; CHECK-DAG: vst [[VTMP]], 48(%r2)
74 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
75 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
76 ; CHECK-DAG: vst [[VTMP]], 32(%r2)
77 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
78 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
79 ; CHECK-DAG: vst [[VTMP]], 16(%r2)
80 ; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI
81 ; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]])
82 ; CHECK: vst [[VTMP]], 0(%r2)
85 ; SOFT-FLOAT-LABEL: f2:
86 ; SOFT-FLOAT-NOT: %{{[fv]}}
88 ; SOFT-FLOAT-NEXT: oilf
89 ; SOFT-FLOAT-NEXT: stg
90 ; SOFT-FLOAT-NEXT: llihh
91 ; SOFT-FLOAT-NEXT: stg
92 ; SOFT-FLOAT-NEXT: llihf
93 ; SOFT-FLOAT-NOT: %{{[fv]}}
95 ret { <2 x double>, <2 x double>, <2 x double>, <2 x double>,
96 <2 x double>, <2 x double>, <2 x double>, <2 x double>,
98 { <2 x double> <double 1.0, double 1.1>,
99 <2 x double> <double 2.0, double 2.1>,
100 <2 x double> <double 3.0, double 3.1>,
101 <2 x double> <double 4.0, double 4.1>,
102 <2 x double> <double 5.0, double 5.1>,
103 <2 x double> <double 6.0, double 6.1>,
104 <2 x double> <double 7.0, double 7.1>,
105 <2 x double> <double 8.0, double 8.1>,
106 <2 x double> <double 9.0, double 9.1> }