1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; Test the handling of named vector arguments.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s -check-prefix=CHECK-VEC
5 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s -check-prefix=CHECK-STACK
7 ; This routine has 6 integer arguments, which fill up r2-r5 and
8 ; the stack slot at offset 160, and 10 vector arguments, which
9 ; fill up v24-v31 and the two double-wide stack slots at 168
11 declare void @bar(i64, i64, i64, i64, i64, i64,
12 <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32>,
13 <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32>,
17 ; CHECK-VEC-LABEL: foo:
19 ; CHECK-VEC-NEXT: stmg %r6, %r15, 48(%r15)
20 ; CHECK-VEC-NEXT: .cfi_offset %r6, -112
21 ; CHECK-VEC-NEXT: .cfi_offset %r14, -48
22 ; CHECK-VEC-NEXT: .cfi_offset %r15, -40
23 ; CHECK-VEC-NEXT: aghi %r15, -200
24 ; CHECK-VEC-NEXT: .cfi_def_cfa_offset 360
25 ; CHECK-VEC-NEXT: vrepif %v0, 10
26 ; CHECK-VEC-NEXT: vst %v0, 184(%r15), 3
27 ; CHECK-VEC-NEXT: vrepif %v0, 9
28 ; CHECK-VEC-NEXT: vrepif %v24, 1
29 ; CHECK-VEC-NEXT: vrepif %v26, 2
30 ; CHECK-VEC-NEXT: vrepif %v28, 3
31 ; CHECK-VEC-NEXT: vrepif %v30, 4
32 ; CHECK-VEC-NEXT: vrepif %v25, 5
33 ; CHECK-VEC-NEXT: vrepif %v27, 6
34 ; CHECK-VEC-NEXT: vrepif %v29, 7
35 ; CHECK-VEC-NEXT: vrepif %v31, 8
36 ; CHECK-VEC-NEXT: lghi %r2, 1
37 ; CHECK-VEC-NEXT: lghi %r3, 2
38 ; CHECK-VEC-NEXT: lghi %r4, 3
39 ; CHECK-VEC-NEXT: lghi %r5, 4
40 ; CHECK-VEC-NEXT: lghi %r6, 5
41 ; CHECK-VEC-NEXT: vst %v0, 168(%r15), 3
42 ; CHECK-VEC-NEXT: mvghi 160(%r15), 6
43 ; CHECK-VEC-NEXT: brasl %r14, bar@PLT
44 ; CHECK-VEC-NEXT: lmg %r6, %r15, 248(%r15)
45 ; CHECK-VEC-NEXT: br %r14
47 ; CHECK-STACK-LABEL: foo:
48 ; CHECK-STACK: # %bb.0:
49 ; CHECK-STACK-NEXT: stmg %r6, %r15, 48(%r15)
50 ; CHECK-STACK-NEXT: .cfi_offset %r6, -112
51 ; CHECK-STACK-NEXT: .cfi_offset %r14, -48
52 ; CHECK-STACK-NEXT: .cfi_offset %r15, -40
53 ; CHECK-STACK-NEXT: aghi %r15, -200
54 ; CHECK-STACK-NEXT: .cfi_def_cfa_offset 360
55 ; CHECK-STACK-NEXT: vrepif %v0, 10
56 ; CHECK-STACK-NEXT: vst %v0, 184(%r15), 3
57 ; CHECK-STACK-NEXT: vrepif %v0, 9
58 ; CHECK-STACK-NEXT: vrepif %v24, 1
59 ; CHECK-STACK-NEXT: vrepif %v26, 2
60 ; CHECK-STACK-NEXT: vrepif %v28, 3
61 ; CHECK-STACK-NEXT: vrepif %v30, 4
62 ; CHECK-STACK-NEXT: vrepif %v25, 5
63 ; CHECK-STACK-NEXT: vrepif %v27, 6
64 ; CHECK-STACK-NEXT: vrepif %v29, 7
65 ; CHECK-STACK-NEXT: vrepif %v31, 8
66 ; CHECK-STACK-NEXT: lghi %r2, 1
67 ; CHECK-STACK-NEXT: lghi %r3, 2
68 ; CHECK-STACK-NEXT: lghi %r4, 3
69 ; CHECK-STACK-NEXT: lghi %r5, 4
70 ; CHECK-STACK-NEXT: lghi %r6, 5
71 ; CHECK-STACK-NEXT: vst %v0, 168(%r15), 3
72 ; CHECK-STACK-NEXT: mvghi 160(%r15), 6
73 ; CHECK-STACK-NEXT: brasl %r14, bar@PLT
74 ; CHECK-STACK-NEXT: lmg %r6, %r15, 248(%r15)
75 ; CHECK-STACK-NEXT: br %r14
77 call void @bar (i64 1, i64 2, i64 3, i64 4, i64 5, i64 6,
78 <4 x i32> <i32 1, i32 1, i32 1, i32 1>,
79 <4 x i32> <i32 2, i32 2, i32 2, i32 2>,
80 <4 x i32> <i32 3, i32 3, i32 3, i32 3>,
81 <4 x i32> <i32 4, i32 4, i32 4, i32 4>,
82 <4 x i32> <i32 5, i32 5, i32 5, i32 5>,
83 <4 x i32> <i32 6, i32 6, i32 6, i32 6>,
84 <4 x i32> <i32 7, i32 7, i32 7, i32 7>,
85 <4 x i32> <i32 8, i32 8, i32 8, i32 8>,
86 <4 x i32> <i32 9, i32 9, i32 9, i32 9>,
87 <4 x i32> <i32 10, i32 10, i32 10, i32 10>)