1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; Test vector intrinsics added with z15.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z15 | FileCheck %s
6 declare <16 x i8> @llvm.s390.vsld(<16 x i8>, <16 x i8>, i32)
7 declare <16 x i8> @llvm.s390.vsrd(<16 x i8>, <16 x i8>, i32)
9 declare {<16 x i8>, i32} @llvm.s390.vstrsb(<16 x i8>, <16 x i8>, <16 x i8>)
10 declare {<16 x i8>, i32} @llvm.s390.vstrsh(<8 x i16>, <8 x i16>, <16 x i8>)
11 declare {<16 x i8>, i32} @llvm.s390.vstrsf(<4 x i32>, <4 x i32>, <16 x i8>)
12 declare {<16 x i8>, i32} @llvm.s390.vstrszb(<16 x i8>, <16 x i8>, <16 x i8>)
13 declare {<16 x i8>, i32} @llvm.s390.vstrszh(<8 x i16>, <8 x i16>, <16 x i8>)
14 declare {<16 x i8>, i32} @llvm.s390.vstrszf(<4 x i32>, <4 x i32>, <16 x i8>)
17 ; VSLD with the minimum useful value.
18 define <16 x i8> @test_vsld_1(<16 x i8> %a, <16 x i8> %b) {
19 ; CHECK-LABEL: test_vsld_1:
21 ; CHECK-NEXT: vsld %v24, %v24, %v26, 1
23 %res = call <16 x i8> @llvm.s390.vsld(<16 x i8> %a, <16 x i8> %b, i32 1)
27 ; VSLD with the maximum value.
28 define <16 x i8> @test_vsld_7(<16 x i8> %a, <16 x i8> %b) {
29 ; CHECK-LABEL: test_vsld_7:
31 ; CHECK-NEXT: vsld %v24, %v24, %v26, 7
33 %res = call <16 x i8> @llvm.s390.vsld(<16 x i8> %a, <16 x i8> %b, i32 7)
37 ; VSRD with the minimum useful value.
38 define <16 x i8> @test_vsrd_1(<16 x i8> %a, <16 x i8> %b) {
39 ; CHECK-LABEL: test_vsrd_1:
41 ; CHECK-NEXT: vsrd %v24, %v24, %v26, 1
43 %res = call <16 x i8> @llvm.s390.vsrd(<16 x i8> %a, <16 x i8> %b, i32 1)
47 ; VSRD with the maximum value.
48 define <16 x i8> @test_vsrd_7(<16 x i8> %a, <16 x i8> %b) {
49 ; CHECK-LABEL: test_vsrd_7:
51 ; CHECK-NEXT: vsrd %v24, %v24, %v26, 7
53 %res = call <16 x i8> @llvm.s390.vsrd(<16 x i8> %a, <16 x i8> %b, i32 7)
59 define <16 x i8> @test_vstrsb(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c,
60 ; CHECK-LABEL: test_vstrsb:
62 ; CHECK-NEXT: vstrsb %v24, %v24, %v26, %v28, 0
64 ; CHECK-NEXT: srl %r0, 28
65 ; CHECK-NEXT: st %r0, 0(%r2)
68 %call = call {<16 x i8>, i32} @llvm.s390.vstrsb(<16 x i8> %a, <16 x i8> %b,
70 %res = extractvalue {<16 x i8>, i32} %call, 0
71 %cc = extractvalue {<16 x i8>, i32} %call, 1
72 store i32 %cc, ptr %ccptr
77 define <16 x i8> @test_vstrsh(<8 x i16> %a, <8 x i16> %b, <16 x i8> %c,
78 ; CHECK-LABEL: test_vstrsh:
80 ; CHECK-NEXT: vstrsh %v24, %v24, %v26, %v28, 0
82 ; CHECK-NEXT: srl %r0, 28
83 ; CHECK-NEXT: st %r0, 0(%r2)
86 %call = call {<16 x i8>, i32} @llvm.s390.vstrsh(<8 x i16> %a, <8 x i16> %b,
88 %res = extractvalue {<16 x i8>, i32} %call, 0
89 %cc = extractvalue {<16 x i8>, i32} %call, 1
90 store i32 %cc, ptr %ccptr
95 define <16 x i8> @test_vstrsf(<4 x i32> %a, <4 x i32> %b, <16 x i8> %c,
96 ; CHECK-LABEL: test_vstrsf:
98 ; CHECK-NEXT: vstrsf %v24, %v24, %v26, %v28, 0
100 ; CHECK-NEXT: srl %r0, 28
101 ; CHECK-NEXT: st %r0, 0(%r2)
102 ; CHECK-NEXT: br %r14
104 %call = call {<16 x i8>, i32} @llvm.s390.vstrsf(<4 x i32> %a, <4 x i32> %b,
106 %res = extractvalue {<16 x i8>, i32} %call, 0
107 %cc = extractvalue {<16 x i8>, i32} %call, 1
108 store i32 %cc, ptr %ccptr
113 define <16 x i8> @test_vstrszb(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c,
114 ; CHECK-LABEL: test_vstrszb:
116 ; CHECK-NEXT: vstrszb %v24, %v24, %v26, %v28
117 ; CHECK-NEXT: ipm %r0
118 ; CHECK-NEXT: srl %r0, 28
119 ; CHECK-NEXT: st %r0, 0(%r2)
120 ; CHECK-NEXT: br %r14
122 %call = call {<16 x i8>, i32} @llvm.s390.vstrszb(<16 x i8> %a, <16 x i8> %b,
124 %res = extractvalue {<16 x i8>, i32} %call, 0
125 %cc = extractvalue {<16 x i8>, i32} %call, 1
126 store i32 %cc, ptr %ccptr
131 define <16 x i8> @test_vstrszh(<8 x i16> %a, <8 x i16> %b, <16 x i8> %c,
132 ; CHECK-LABEL: test_vstrszh:
134 ; CHECK-NEXT: vstrszh %v24, %v24, %v26, %v28
135 ; CHECK-NEXT: ipm %r0
136 ; CHECK-NEXT: srl %r0, 28
137 ; CHECK-NEXT: st %r0, 0(%r2)
138 ; CHECK-NEXT: br %r14
140 %call = call {<16 x i8>, i32} @llvm.s390.vstrszh(<8 x i16> %a, <8 x i16> %b,
142 %res = extractvalue {<16 x i8>, i32} %call, 0
143 %cc = extractvalue {<16 x i8>, i32} %call, 1
144 store i32 %cc, ptr %ccptr
149 define <16 x i8> @test_vstrszf(<4 x i32> %a, <4 x i32> %b, <16 x i8> %c,
150 ; CHECK-LABEL: test_vstrszf:
152 ; CHECK-NEXT: vstrszf %v24, %v24, %v26, %v28
153 ; CHECK-NEXT: ipm %r0
154 ; CHECK-NEXT: srl %r0, 28
155 ; CHECK-NEXT: st %r0, 0(%r2)
156 ; CHECK-NEXT: br %r14
158 %call = call {<16 x i8>, i32} @llvm.s390.vstrszf(<4 x i32> %a, <4 x i32> %b,
160 %res = extractvalue {<16 x i8>, i32} %call, 0
161 %cc = extractvalue {<16 x i8>, i32} %call, 1
162 store i32 %cc, ptr %ccptr