1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; Verify that we handle single-element vector types correctly.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
6 define void @f1(<1 x i128> %a, ptr %ptr) {
9 ; CHECK-NEXT: vst %v24, 0(%r2), 3
11 store <1 x i128> %a, ptr %ptr
15 define <1 x i128> @f2() {
18 ; CHECK-NEXT: vgbm %v24, 0
20 ret <1 x i128><i128 0>
23 declare void @bar3(<1 x i128>)
28 ; CHECK-NEXT: stmg %r14, %r15, 112(%r15)
29 ; CHECK-NEXT: .cfi_offset %r14, -48
30 ; CHECK-NEXT: .cfi_offset %r15, -40
31 ; CHECK-NEXT: aghi %r15, -160
32 ; CHECK-NEXT: .cfi_def_cfa_offset 320
33 ; CHECK-NEXT: vgbm %v24, 0
34 ; CHECK-NEXT: brasl %r14, bar3@PLT
35 ; CHECK-NEXT: lmg %r14, %r15, 272(%r15)
37 call void @bar3 (<1 x i128> <i128 0>)
41 declare <1 x i128> @bar4()
43 define void @f4(ptr %ptr) {
46 ; CHECK-NEXT: stmg %r13, %r15, 104(%r15)
47 ; CHECK-NEXT: .cfi_offset %r13, -56
48 ; CHECK-NEXT: .cfi_offset %r14, -48
49 ; CHECK-NEXT: .cfi_offset %r15, -40
50 ; CHECK-NEXT: aghi %r15, -160
51 ; CHECK-NEXT: .cfi_def_cfa_offset 320
52 ; CHECK-NEXT: lgr %r13, %r2
53 ; CHECK-NEXT: brasl %r14, bar4@PLT
54 ; CHECK-NEXT: vst %v24, 0(%r13), 3
55 ; CHECK-NEXT: lmg %r13, %r15, 264(%r15)
57 %res = call <1 x i128> @bar4 ()
58 store <1 x i128> %res, ptr %ptr
62 define void @f5(<1 x fp128> %a, ptr %ptr) {
65 ; CHECK-NEXT: vst %v24, 0(%r2), 3
67 store <1 x fp128> %a, ptr %ptr
71 define <1 x fp128> @f6() {
74 ; CHECK-NEXT: lzxr %f0
75 ; CHECK-NEXT: vmrhg %v24, %v0, %v2
77 ret <1 x fp128><fp128 0xL00000000000000000000000000000000>
80 declare void @bar7(<1 x fp128>)
85 ; CHECK-NEXT: stmg %r14, %r15, 112(%r15)
86 ; CHECK-NEXT: .cfi_offset %r14, -48
87 ; CHECK-NEXT: .cfi_offset %r15, -40
88 ; CHECK-NEXT: aghi %r15, -160
89 ; CHECK-NEXT: .cfi_def_cfa_offset 320
90 ; CHECK-NEXT: lzxr %f0
91 ; CHECK-NEXT: vmrhg %v24, %v0, %v2
92 ; CHECK-NEXT: brasl %r14, bar7@PLT
93 ; CHECK-NEXT: lmg %r14, %r15, 272(%r15)
95 call void @bar7 (<1 x fp128> <fp128 0xL00000000000000000000000000000000>)
99 declare <1 x fp128> @bar8()
101 define void @f8(ptr %ptr) {
104 ; CHECK-NEXT: stmg %r13, %r15, 104(%r15)
105 ; CHECK-NEXT: .cfi_offset %r13, -56
106 ; CHECK-NEXT: .cfi_offset %r14, -48
107 ; CHECK-NEXT: .cfi_offset %r15, -40
108 ; CHECK-NEXT: aghi %r15, -160
109 ; CHECK-NEXT: .cfi_def_cfa_offset 320
110 ; CHECK-NEXT: lgr %r13, %r2
111 ; CHECK-NEXT: brasl %r14, bar8@PLT
112 ; CHECK-NEXT: vst %v24, 0(%r13), 3
113 ; CHECK-NEXT: lmg %r13, %r15, 264(%r15)
114 ; CHECK-NEXT: br %r14
115 %res = call <1 x fp128> @bar8 ()
116 store <1 x fp128> %res, ptr %ptr