1 ; Test v2i64 comparisons.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
6 define <2 x i64> @f1(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
8 ; CHECK: vceqg %v24, %v26, %v28
10 %cmp = icmp eq <2 x i64> %val1, %val2
11 %ret = sext <2 x i1> %cmp to <2 x i64>
16 define <2 x i64> @f2(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
18 ; CHECK: vceqg [[REG:%v[0-9]+]], %v26, %v28
19 ; CHECK-NEXT: vno %v24, [[REG]], [[REG]]
21 %cmp = icmp ne <2 x i64> %val1, %val2
22 %ret = sext <2 x i1> %cmp to <2 x i64>
27 define <2 x i64> @f3(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
29 ; CHECK: vchg %v24, %v26, %v28
31 %cmp = icmp sgt <2 x i64> %val1, %val2
32 %ret = sext <2 x i1> %cmp to <2 x i64>
37 define <2 x i64> @f4(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
39 ; CHECK: vchg [[REG:%v[0-9]+]], %v28, %v26
40 ; CHECK-NEXT: vno %v24, [[REG]], [[REG]]
42 %cmp = icmp sge <2 x i64> %val1, %val2
43 %ret = sext <2 x i1> %cmp to <2 x i64>
48 define <2 x i64> @f5(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
50 ; CHECK: vchg [[REG:%v[0-9]+]], %v26, %v28
51 ; CHECK-NEXT: vno %v24, [[REG]], [[REG]]
53 %cmp = icmp sle <2 x i64> %val1, %val2
54 %ret = sext <2 x i1> %cmp to <2 x i64>
59 define <2 x i64> @f6(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
61 ; CHECK: vchg %v24, %v28, %v26
63 %cmp = icmp slt <2 x i64> %val1, %val2
64 %ret = sext <2 x i1> %cmp to <2 x i64>
69 define <2 x i64> @f7(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
71 ; CHECK: vchlg %v24, %v26, %v28
73 %cmp = icmp ugt <2 x i64> %val1, %val2
74 %ret = sext <2 x i1> %cmp to <2 x i64>
79 define <2 x i64> @f8(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
81 ; CHECK: vchlg [[REG:%v[0-9]+]], %v28, %v26
82 ; CHECK-NEXT: vno %v24, [[REG]], [[REG]]
84 %cmp = icmp uge <2 x i64> %val1, %val2
85 %ret = sext <2 x i1> %cmp to <2 x i64>
90 define <2 x i64> @f9(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
92 ; CHECK: vchlg [[REG:%v[0-9]+]], %v26, %v28
93 ; CHECK-NEXT: vno %v24, [[REG]], [[REG]]
95 %cmp = icmp ule <2 x i64> %val1, %val2
96 %ret = sext <2 x i1> %cmp to <2 x i64>
101 define <2 x i64> @f10(<2 x i64> %dummy, <2 x i64> %val1, <2 x i64> %val2) {
103 ; CHECK: vchlg %v24, %v28, %v26
104 ; CHECK-NEXT: br %r14
105 %cmp = icmp ult <2 x i64> %val1, %val2
106 %ret = sext <2 x i1> %cmp to <2 x i64>
111 define <2 x i64> @f11(<2 x i64> %val1, <2 x i64> %val2,
112 <2 x i64> %val3, <2 x i64> %val4) {
114 ; CHECK: vceqg [[REG:%v[0-9]+]], %v24, %v26
115 ; CHECK-NEXT: vsel %v24, %v28, %v30, [[REG]]
116 ; CHECK-NEXT: br %r14
117 %cmp = icmp eq <2 x i64> %val1, %val2
118 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
123 define <2 x i64> @f12(<2 x i64> %val1, <2 x i64> %val2,
124 <2 x i64> %val3, <2 x i64> %val4) {
126 ; CHECK: vceqg [[REG:%v[0-9]+]], %v24, %v26
127 ; CHECK-NEXT: vsel %v24, %v30, %v28, [[REG]]
128 ; CHECK-NEXT: br %r14
129 %cmp = icmp ne <2 x i64> %val1, %val2
130 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
135 define <2 x i64> @f13(<2 x i64> %val1, <2 x i64> %val2,
136 <2 x i64> %val3, <2 x i64> %val4) {
138 ; CHECK: vchg [[REG:%v[0-9]+]], %v24, %v26
139 ; CHECK-NEXT: vsel %v24, %v28, %v30, [[REG]]
140 ; CHECK-NEXT: br %r14
141 %cmp = icmp sgt <2 x i64> %val1, %val2
142 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
147 define <2 x i64> @f14(<2 x i64> %val1, <2 x i64> %val2,
148 <2 x i64> %val3, <2 x i64> %val4) {
150 ; CHECK: vchg [[REG:%v[0-9]+]], %v26, %v24
151 ; CHECK-NEXT: vsel %v24, %v30, %v28, [[REG]]
152 ; CHECK-NEXT: br %r14
153 %cmp = icmp sge <2 x i64> %val1, %val2
154 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
159 define <2 x i64> @f15(<2 x i64> %val1, <2 x i64> %val2,
160 <2 x i64> %val3, <2 x i64> %val4) {
162 ; CHECK: vchg [[REG:%v[0-9]+]], %v24, %v26
163 ; CHECK-NEXT: vsel %v24, %v30, %v28, [[REG]]
164 ; CHECK-NEXT: br %r14
165 %cmp = icmp sle <2 x i64> %val1, %val2
166 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
171 define <2 x i64> @f16(<2 x i64> %val1, <2 x i64> %val2,
172 <2 x i64> %val3, <2 x i64> %val4) {
174 ; CHECK: vchg [[REG:%v[0-9]+]], %v26, %v24
175 ; CHECK-NEXT: vsel %v24, %v28, %v30, [[REG]]
176 ; CHECK-NEXT: br %r14
177 %cmp = icmp slt <2 x i64> %val1, %val2
178 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
183 define <2 x i64> @f17(<2 x i64> %val1, <2 x i64> %val2,
184 <2 x i64> %val3, <2 x i64> %val4) {
186 ; CHECK: vchlg [[REG:%v[0-9]+]], %v24, %v26
187 ; CHECK-NEXT: vsel %v24, %v28, %v30, [[REG]]
188 ; CHECK-NEXT: br %r14
189 %cmp = icmp ugt <2 x i64> %val1, %val2
190 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
195 define <2 x i64> @f18(<2 x i64> %val1, <2 x i64> %val2,
196 <2 x i64> %val3, <2 x i64> %val4) {
198 ; CHECK: vchlg [[REG:%v[0-9]+]], %v26, %v24
199 ; CHECK-NEXT: vsel %v24, %v30, %v28, [[REG]]
200 ; CHECK-NEXT: br %r14
201 %cmp = icmp uge <2 x i64> %val1, %val2
202 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
207 define <2 x i64> @f19(<2 x i64> %val1, <2 x i64> %val2,
208 <2 x i64> %val3, <2 x i64> %val4) {
210 ; CHECK: vchlg [[REG:%v[0-9]+]], %v24, %v26
211 ; CHECK-NEXT: vsel %v24, %v30, %v28, [[REG]]
212 ; CHECK-NEXT: br %r14
213 %cmp = icmp ule <2 x i64> %val1, %val2
214 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4
219 define <2 x i64> @f20(<2 x i64> %val1, <2 x i64> %val2,
220 <2 x i64> %val3, <2 x i64> %val4) {
222 ; CHECK: vchlg [[REG:%v[0-9]+]], %v26, %v24
223 ; CHECK-NEXT: vsel %v24, %v28, %v30, [[REG]]
224 ; CHECK-NEXT: br %r14
225 %cmp = icmp ult <2 x i64> %val1, %val2
226 %ret = select <2 x i1> %cmp, <2 x i64> %val3, <2 x i64> %val4