1 ; Test calling functions with 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. 6 declare { <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> } @bar1() 8 9 define <2 x double> @f1() { 10 ; CHECK-LABEL: f1: 11 ; CHECK: brasl %r14, bar1 12 ; CHECK: vlr %v24, %v31 13 ; CHECK: br %r14 14 %mret = call { <2 x double>, <2 x double>, 15 <2 x double>, <2 x double>, 16 <2 x double>, <2 x double>, 17 <2 x double>, <2 x double> } @bar1() 18 %ret = extractvalue { <2 x double>, <2 x double>, 19 <2 x double>, <2 x double>, 20 <2 x double>, <2 x double>, 21 <2 x double>, <2 x double> } %mret, 7 22 ret <2 x double> %ret 23 } 24 25 ; More than eight vector return values use sret. 26 declare { <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> } @bar2() 29 30 define <2 x double> @f2() { 31 ; CHECK-LABEL: f2: 32 ; CHECK: la %r2, 160(%r15) 33 ; CHECK: brasl %r14, bar2 34 ; CHECK: vl %v24, 288(%r15) 35 ; CHECK: br %r14 36 %mret = call { <2 x double>, <2 x double>, 37 <2 x double>, <2 x double>, 38 <2 x double>, <2 x double>, 39 <2 x double>, <2 x double>, 40 <2 x double> } @bar2() 41 %ret = extractvalue { <2 x double>, <2 x double>, 42 <2 x double>, <2 x double>, 43 <2 x double>, <2 x double>, 44 <2 x double>, <2 x double>, 45 <2 x double> } %mret, 8 46 ret <2 x double> %ret 47 } 48