[SystemZ] Handle sub-128 vectors
[oota-llvm.git] / test / CodeGen / SystemZ / vec-args-05.ll
1 ; Test the handling of unnamed short vector arguments.
2 ;
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s -check-prefix=CHECK-VEC
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s -check-prefix=CHECK-STACK
5
6 ; This routine is called with two named vector argument (passed
7 ; in %v24 and %v26) and two unnamed vector arguments (passed
8 ; in the single-wide stack slots at 160 and 168).
9 declare void @bar(<4 x i8>, <4 x i8>, ...)
10
11 define void @foo() {
12 ; CHECK-VEC-LABEL: foo:
13 ; CHECK-VEC-DAG: vrepib %v24, 1
14 ; CHECK-VEC-DAG: vrepib %v26, 2
15 ; CHECK-VEC: brasl %r14, bar@PLT
16 ;
17 ; CHECK-STACK-LABEL: foo:
18 ; CHECK-STACK: aghi %r15, -176
19 ; CHECK-STACK-DAG: llihf [[REG1:%r[0-9]+]], 50529027
20 ; CHECK-STACK-DAG: stg [[REG1]], 160(%r15)
21 ; CHECK-STACK-DAG: llihf [[REG2:%r[0-9]+]], 67372036
22 ; CHECK-STACK-DAG: stg [[REG2]], 168(%r15)
23 ; CHECK-STACK: brasl %r14, bar@PLT
24
25   call void (<4 x i8>, <4 x i8>, ...) @bar
26               (<4 x i8> <i8 1, i8 1, i8 1, i8 1>,
27                <4 x i8> <i8 2, i8 2, i8 2, i8 2>,
28                <4 x i8> <i8 3, i8 3, i8 3, i8 3>,
29                <4 x i8> <i8 4, i8 4, i8 4, i8 4>)
30   ret void
31 }
32