1; Test multiple return values (LLVM ABI extension) 2; 3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s 4 5; Up to eight vector return values fit into VRs. 6define { <2 x double>, <2 x double>, <2 x double>, <2 x double>, 7 <2 x double>, <2 x double>, <2 x double>, <2 x double> } @f1() { 8; CHECK-LABEL: f1: 9; CHECK: larl [[TMP:%r[0-5]]], .LCPI 10; CHECK: vl %v24, 0([[TMP]]) 11; CHECK: larl [[TMP:%r[0-5]]], .LCPI 12; CHECK: vl %v26, 0([[TMP]]) 13; CHECK: larl [[TMP:%r[0-5]]], .LCPI 14; CHECK: vl %v28, 0([[TMP]]) 15; CHECK: larl [[TMP:%r[0-5]]], .LCPI 16; CHECK: vl %v30, 0([[TMP]]) 17; CHECK: larl [[TMP:%r[0-5]]], .LCPI 18; CHECK: vl %v25, 0([[TMP]]) 19; CHECK: larl [[TMP:%r[0-5]]], .LCPI 20; CHECK: vl %v27, 0([[TMP]]) 21; CHECK: larl [[TMP:%r[0-5]]], .LCPI 22; CHECK: vl %v29, 0([[TMP]]) 23; CHECK: larl [[TMP:%r[0-5]]], .LCPI 24; CHECK: vl %v31, 0([[TMP]]) 25; CHECK: br %r14 26 ret { <2 x double>, <2 x double>, <2 x double>, <2 x double>, 27 <2 x double>, <2 x double>, <2 x double>, <2 x double> } 28 { <2 x double> <double 1.0, double 1.1>, 29 <2 x double> <double 2.0, double 2.1>, 30 <2 x double> <double 3.0, double 3.1>, 31 <2 x double> <double 4.0, double 4.1>, 32 <2 x double> <double 5.0, double 5.1>, 33 <2 x double> <double 6.0, double 6.1>, 34 <2 x double> <double 7.0, double 7.1>, 35 <2 x double> <double 8.0, double 8.1> } 36} 37 38; More than eight vector return values use sret. 39define { <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> } @f2() { 42; CHECK-LABEL: f2: 43; CHECK: larl [[TMP:%r[0-5]]], .LCPI 44; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 45; CHECK-DAG: vst [[VTMP]], 128(%r2) 46; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 47; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 48; CHECK-DAG: vst [[VTMP]], 112(%r2) 49; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 50; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 51; CHECK-DAG: vst [[VTMP]], 96(%r2) 52; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 53; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 54; CHECK-DAG: vst [[VTMP]], 80(%r2) 55; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 56; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 57; CHECK-DAG: vst [[VTMP]], 64(%r2) 58; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 59; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 60; CHECK-DAG: vst [[VTMP]], 48(%r2) 61; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 62; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 63; CHECK-DAG: vst [[VTMP]], 32(%r2) 64; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 65; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 66; CHECK-DAG: vst [[VTMP]], 16(%r2) 67; CHECK-DAG: larl [[TMP:%r[0-5]]], .LCPI 68; CHECK: vl [[VTMP:%v[0-9]+]], 0([[TMP]]) 69; CHECK: vst [[VTMP]], 0(%r2) 70; CHECK: br %r14 71 ret { <2 x double>, <2 x double>, <2 x double>, <2 x double>, 72 <2 x double>, <2 x double>, <2 x double>, <2 x double>, 73 <2 x double> } 74 { <2 x double> <double 1.0, double 1.1>, 75 <2 x double> <double 2.0, double 2.1>, 76 <2 x double> <double 3.0, double 3.1>, 77 <2 x double> <double 4.0, double 4.1>, 78 <2 x double> <double 5.0, double 5.1>, 79 <2 x double> <double 6.0, double 6.1>, 80 <2 x double> <double 7.0, double 7.1>, 81 <2 x double> <double 8.0, double 8.1>, 82 <2 x double> <double 9.0, double 9.1> } 83} 84