1; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -mattr=+simd128 | FileCheck %s --check-prefixes CHECK,SIMD128
2; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals | FileCheck %s --check-prefixes CHECK,NO-SIMD128
3
4; Test SIMD comparison operators
5
6target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
7target triple = "wasm32-unknown-unknown"
8
9; CHECK-LABEL: compare_eq_v16i8:
10; NO-SIMD128-NOT: i8x16
11; SIMD128-NEXT: .functype compare_eq_v16i8 (v128, v128) -> (v128){{$}}
12; SIMD128-NEXT: i8x16.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
13; SIMD128-NEXT: return $pop[[R]]{{$}}
14define <16 x i1> @compare_eq_v16i8 (<16 x i8> %x, <16 x i8> %y) {
15  %res = icmp eq <16 x i8> %x, %y
16  ret <16 x i1> %res
17}
18
19; CHECK-LABEL: compare_sext_eq_v16i8:
20; NO-SIMD128-NOT: i8x16
21; SIMD128-NEXT: .functype compare_sext_eq_v16i8 (v128, v128) -> (v128){{$}}
22; SIMD128-NEXT: i8x16.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
23; SIMD128-NEXT: return $pop[[R]]{{$}}
24define <16 x i8> @compare_sext_eq_v16i8 (<16 x i8> %x, <16 x i8> %y) {
25  %cmp = icmp eq <16 x i8> %x, %y
26  %res = sext <16 x i1> %cmp to <16 x i8>
27  ret <16 x i8> %res
28}
29
30; CHECK-LABEL: compare_ne_v16i8:
31; NO-SIMD128-NOT: i8x16
32; SIMD128-NEXT: .functype compare_ne_v16i8 (v128, v128) -> (v128){{$}}
33; SIMD128-NEXT: i8x16.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
34; SIMD128-NEXT: return $pop[[R]]{{$}}
35define <16 x i1> @compare_ne_v16i8 (<16 x i8> %x, <16 x i8> %y) {
36  %res = icmp ne <16 x i8> %x, %y
37  ret <16 x i1> %res
38}
39
40; CHECK-LABEL: compare_sext_ne_v16i8:
41; NO-SIMD128-NOT: i8x16
42; SIMD128-NEXT: .functype compare_sext_ne_v16i8 (v128, v128) -> (v128){{$}}
43; SIMD128-NEXT: i8x16.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
44; SIMD128-NEXT: return $pop[[R]]{{$}}
45define <16 x i8> @compare_sext_ne_v16i8 (<16 x i8> %x, <16 x i8> %y) {
46  %cmp = icmp ne <16 x i8> %x, %y
47  %res = sext <16 x i1> %cmp to <16 x i8>
48  ret <16 x i8> %res
49}
50
51; CHECK-LABEL: compare_slt_v16i8:
52; NO-SIMD128-NOT: i8x16
53; SIMD128-NEXT: .functype compare_slt_v16i8 (v128, v128) -> (v128){{$}}
54; SIMD128-NEXT: i8x16.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
55; SIMD128-NEXT: return $pop[[R]]{{$}}
56define <16 x i1> @compare_slt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
57  %res = icmp slt <16 x i8> %x, %y
58  ret <16 x i1> %res
59}
60
61; CHECK-LABEL: compare_sext_slt_v16i8:
62; NO-SIMD128-NOT: i8x16
63; SIMD128-NEXT: .functype compare_sext_slt_v16i8 (v128, v128) -> (v128){{$}}
64; SIMD128-NEXT: i8x16.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
65; SIMD128-NEXT: return $pop[[R]]{{$}}
66define <16 x i8> @compare_sext_slt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
67  %cmp = icmp slt <16 x i8> %x, %y
68  %res = sext <16 x i1> %cmp to <16 x i8>
69  ret <16 x i8> %res
70}
71
72; CHECK-LABEL: compare_ult_v16i8:
73; NO-SIMD128-NOT: i8x16
74; SIMD128-NEXT: .functype compare_ult_v16i8 (v128, v128) -> (v128){{$}}
75; SIMD128-NEXT: i8x16.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
76; SIMD128-NEXT: return $pop[[R]]{{$}}
77define <16 x i1> @compare_ult_v16i8 (<16 x i8> %x, <16 x i8> %y) {
78  %res = icmp ult <16 x i8> %x, %y
79  ret <16 x i1> %res
80}
81
82; CHECK-LABEL: compare_sext_ult_v16i8:
83; NO-SIMD128-NOT: i8x16
84; SIMD128-NEXT: .functype compare_sext_ult_v16i8 (v128, v128) -> (v128){{$}}
85; SIMD128-NEXT: i8x16.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
86; SIMD128-NEXT: return $pop[[R]]{{$}}
87define <16 x i8> @compare_sext_ult_v16i8 (<16 x i8> %x, <16 x i8> %y) {
88  %cmp = icmp ult <16 x i8> %x, %y
89  %res = sext <16 x i1> %cmp to <16 x i8>
90  ret <16 x i8> %res
91}
92
93; CHECK-LABEL: compare_sle_v16i8:
94; NO-SIMD128-NOT: i8x16
95; SIMD128-NEXT: .functype compare_sle_v16i8 (v128, v128) -> (v128){{$}}
96; SIMD128-NEXT: i8x16.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
97; SIMD128-NEXT: return $pop[[R]]{{$}}
98define <16 x i1> @compare_sle_v16i8 (<16 x i8> %x, <16 x i8> %y) {
99  %res = icmp sle <16 x i8> %x, %y
100  ret <16 x i1> %res
101}
102
103; CHECK-LABEL: compare_sext_sle_v16i8:
104; NO-SIMD128-NOT: i8x16
105; SIMD128-NEXT: .functype compare_sext_sle_v16i8 (v128, v128) -> (v128){{$}}
106; SIMD128-NEXT: i8x16.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
107; SIMD128-NEXT: return $pop[[R]]{{$}}
108define <16 x i8> @compare_sext_sle_v16i8 (<16 x i8> %x, <16 x i8> %y) {
109  %cmp = icmp sle <16 x i8> %x, %y
110  %res = sext <16 x i1> %cmp to <16 x i8>
111  ret <16 x i8> %res
112}
113
114; CHECK-LABEL: compare_ule_v16i8:
115; NO-SIMD128-NOT: i8x16
116; SIMD128-NEXT: .functype compare_ule_v16i8 (v128, v128) -> (v128){{$}}
117; SIMD128-NEXT: i8x16.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
118; SIMD128-NEXT: return $pop[[R]]{{$}}
119define <16 x i1> @compare_ule_v16i8 (<16 x i8> %x, <16 x i8> %y) {
120  %res = icmp ule <16 x i8> %x, %y
121  ret <16 x i1> %res
122}
123
124; CHECK-LABEL: compare_sext_ule_v16i8:
125; NO-SIMD128-NOT: i8x16
126; SIMD128-NEXT: .functype compare_sext_ule_v16i8 (v128, v128) -> (v128){{$}}
127; SIMD128-NEXT: i8x16.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
128; SIMD128-NEXT: return $pop[[R]]{{$}}
129define <16 x i8> @compare_sext_ule_v16i8 (<16 x i8> %x, <16 x i8> %y) {
130  %cmp = icmp ule <16 x i8> %x, %y
131  %res = sext <16 x i1> %cmp to <16 x i8>
132  ret <16 x i8> %res
133}
134
135; CHECK-LABEL: compare_sgt_v16i8:
136; NO-SIMD128-NOT: i8x16
137; SIMD128-NEXT: .functype compare_sgt_v16i8 (v128, v128) -> (v128){{$}}
138; SIMD128-NEXT: i8x16.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
139; SIMD128-NEXT: return $pop[[R]]{{$}}
140define <16 x i1> @compare_sgt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
141  %res = icmp sgt <16 x i8> %x, %y
142  ret <16 x i1> %res
143}
144
145; CHECK-LABEL: compare_sext_sgt_v16i8:
146; NO-SIMD128-NOT: i8x16
147; SIMD128-NEXT: .functype compare_sext_sgt_v16i8 (v128, v128) -> (v128){{$}}
148; SIMD128-NEXT: i8x16.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
149; SIMD128-NEXT: return $pop[[R]]{{$}}
150define <16 x i8> @compare_sext_sgt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
151  %cmp = icmp sgt <16 x i8> %x, %y
152  %res = sext <16 x i1> %cmp to <16 x i8>
153  ret <16 x i8> %res
154}
155
156; CHECK-LABEL: compare_ugt_v16i8:
157; NO-SIMD128-NOT: i8x16
158; SIMD128-NEXT: .functype compare_ugt_v16i8 (v128, v128) -> (v128){{$}}
159; SIMD128-NEXT: i8x16.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
160; SIMD128-NEXT: return $pop[[R]]{{$}}
161define <16 x i1> @compare_ugt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
162  %res = icmp ugt <16 x i8> %x, %y
163  ret <16 x i1> %res
164}
165
166; CHECK-LABEL: compare_sext_ugt_v16i8:
167; NO-SIMD128-NOT: i8x16
168; SIMD128-NEXT: .functype compare_sext_ugt_v16i8 (v128, v128) -> (v128){{$}}
169; SIMD128-NEXT: i8x16.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
170; SIMD128-NEXT: return $pop[[R]]{{$}}
171define <16 x i8> @compare_sext_ugt_v16i8 (<16 x i8> %x, <16 x i8> %y) {
172  %cmp = icmp ugt <16 x i8> %x, %y
173  %res = sext <16 x i1> %cmp to <16 x i8>
174  ret <16 x i8> %res
175}
176
177; CHECK-LABEL: compare_sge_v16i8:
178; NO-SIMD128-NOT: i8x16
179; SIMD128-NEXT: .functype compare_sge_v16i8 (v128, v128) -> (v128){{$}}
180; SIMD128-NEXT: i8x16.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
181; SIMD128-NEXT: return $pop[[R]]{{$}}
182define <16 x i1> @compare_sge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
183  %res = icmp sge <16 x i8> %x, %y
184  ret <16 x i1> %res
185}
186
187; CHECK-LABEL: compare_sext_sge_v16i8:
188; NO-SIMD128-NOT: i8x16
189; SIMD128-NEXT: .functype compare_sext_sge_v16i8 (v128, v128) -> (v128){{$}}
190; SIMD128-NEXT: i8x16.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
191; SIMD128-NEXT: return $pop[[R]]{{$}}
192define <16 x i8> @compare_sext_sge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
193  %cmp = icmp sge <16 x i8> %x, %y
194  %res = sext <16 x i1> %cmp to <16 x i8>
195  ret <16 x i8> %res
196}
197
198; CHECK-LABEL: compare_uge_v16i8:
199; NO-SIMD128-NOT: i8x16
200; SIMD128-NEXT: .functype compare_uge_v16i8 (v128, v128) -> (v128){{$}}
201; SIMD128-NEXT: i8x16.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
202; SIMD128-NEXT: return $pop[[R]]{{$}}
203define <16 x i1> @compare_uge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
204  %res = icmp uge <16 x i8> %x, %y
205  ret <16 x i1> %res
206}
207
208; CHECK-LABEL: compare_sext_uge_v16i8:
209; NO-SIMD128-NOT: i8x16
210; SIMD128-NEXT: .functype compare_sext_uge_v16i8 (v128, v128) -> (v128){{$}}
211; SIMD128-NEXT: i8x16.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
212; SIMD128-NEXT: return $pop[[R]]{{$}}
213define <16 x i8> @compare_sext_uge_v16i8 (<16 x i8> %x, <16 x i8> %y) {
214  %cmp = icmp uge <16 x i8> %x, %y
215  %res = sext <16 x i1> %cmp to <16 x i8>
216  ret <16 x i8> %res
217}
218
219; CHECK-LABEL: compare_eq_v8i16:
220; NO-SIMD128-NOT: i16x8
221; SIMD128-NEXT: .functype compare_eq_v8i16 (v128, v128) -> (v128){{$}}
222; SIMD128-NEXT: i16x8.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
223; SIMD128-NEXT: return $pop[[R]]{{$}}
224define <8 x i1> @compare_eq_v8i16 (<8 x i16> %x, <8 x i16> %y) {
225  %res = icmp eq <8 x i16> %x, %y
226  ret <8 x i1> %res
227}
228
229; CHECK-LABEL: compare_sext_eq_v8i16:
230; NO-SIMD128-NOT: i16x8
231; SIMD128-NEXT: .functype compare_sext_eq_v8i16 (v128, v128) -> (v128){{$}}
232; SIMD128-NEXT: i16x8.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
233; SIMD128-NEXT: return $pop[[R]]{{$}}
234define <8 x i16> @compare_sext_eq_v8i16 (<8 x i16> %x, <8 x i16> %y) {
235  %cmp = icmp eq <8 x i16> %x, %y
236  %res = sext <8 x i1> %cmp to <8 x i16>
237  ret <8 x i16> %res
238}
239
240; CHECK-LABEL: compare_ne_v8i16:
241; NO-SIMD128-NOT: i16x8
242; SIMD128-NEXT: .functype compare_ne_v8i16 (v128, v128) -> (v128){{$}}
243; SIMD128-NEXT: i16x8.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
244; SIMD128-NEXT: return $pop[[R]]{{$}}
245define <8 x i1> @compare_ne_v8i16 (<8 x i16> %x, <8 x i16> %y) {
246  %res = icmp ne <8 x i16> %x, %y
247  ret <8 x i1> %res
248}
249
250; CHECK-LABEL: compare_sext_ne_v8i16:
251; NO-SIMD128-NOT: i16x8
252; SIMD128-NEXT: .functype compare_sext_ne_v8i16 (v128, v128) -> (v128){{$}}
253; SIMD128-NEXT: i16x8.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
254; SIMD128-NEXT: return $pop[[R]]{{$}}
255define <8 x i16> @compare_sext_ne_v8i16 (<8 x i16> %x, <8 x i16> %y) {
256  %cmp = icmp ne <8 x i16> %x, %y
257  %res = sext <8 x i1> %cmp to <8 x i16>
258  ret <8 x i16> %res
259}
260
261; CHECK-LABEL: compare_slt_v8i16:
262; NO-SIMD128-NOT: i16x8
263; SIMD128-NEXT: .functype compare_slt_v8i16 (v128, v128) -> (v128){{$}}
264; SIMD128-NEXT: i16x8.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
265; SIMD128-NEXT: return $pop[[R]]{{$}}
266define <8 x i1> @compare_slt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
267  %res = icmp slt <8 x i16> %x, %y
268  ret <8 x i1> %res
269}
270
271; CHECK-LABEL: compare_sext_slt_v8i16:
272; NO-SIMD128-NOT: i16x8
273; SIMD128-NEXT: .functype compare_sext_slt_v8i16 (v128, v128) -> (v128){{$}}
274; SIMD128-NEXT: i16x8.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
275; SIMD128-NEXT: return $pop[[R]]{{$}}
276define <8 x i16> @compare_sext_slt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
277  %cmp = icmp slt <8 x i16> %x, %y
278  %res = sext <8 x i1> %cmp to <8 x i16>
279  ret <8 x i16> %res
280}
281
282; CHECK-LABEL: compare_ult_v8i16:
283; NO-SIMD128-NOT: i16x8
284; SIMD128-NEXT: .functype compare_ult_v8i16 (v128, v128) -> (v128){{$}}
285; SIMD128-NEXT: i16x8.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
286; SIMD128-NEXT: return $pop[[R]]{{$}}
287define <8 x i1> @compare_ult_v8i16 (<8 x i16> %x, <8 x i16> %y) {
288  %res = icmp ult <8 x i16> %x, %y
289  ret <8 x i1> %res
290}
291
292; CHECK-LABEL: compare_sext_ult_v8i16:
293; NO-SIMD128-NOT: i16x8
294; SIMD128-NEXT: .functype compare_sext_ult_v8i16 (v128, v128) -> (v128){{$}}
295; SIMD128-NEXT: i16x8.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
296; SIMD128-NEXT: return $pop[[R]]{{$}}
297define <8 x i16> @compare_sext_ult_v8i16 (<8 x i16> %x, <8 x i16> %y) {
298  %cmp = icmp ult <8 x i16> %x, %y
299  %res = sext <8 x i1> %cmp to <8 x i16>
300  ret <8 x i16> %res
301}
302
303; CHECK-LABEL: compare_sle_v8i16:
304; NO-SIMD128-NOT: i16x8
305; SIMD128-NEXT: .functype compare_sle_v8i16 (v128, v128) -> (v128){{$}}
306; SIMD128-NEXT: i16x8.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
307; SIMD128-NEXT: return $pop[[R]]{{$}}
308define <8 x i1> @compare_sle_v8i16 (<8 x i16> %x, <8 x i16> %y) {
309  %res = icmp sle <8 x i16> %x, %y
310  ret <8 x i1> %res
311}
312
313; CHECK-LABEL: compare_sext_sle_v8i16:
314; NO-SIMD128-NOT: i16x8
315; SIMD128-NEXT: .functype compare_sext_sle_v8i16 (v128, v128) -> (v128){{$}}
316; SIMD128-NEXT: i16x8.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
317; SIMD128-NEXT: return $pop[[R]]{{$}}
318define <8 x i16> @compare_sext_sle_v8i16 (<8 x i16> %x, <8 x i16> %y) {
319  %cmp = icmp sle <8 x i16> %x, %y
320  %res = sext <8 x i1> %cmp to <8 x i16>
321  ret <8 x i16> %res
322}
323
324; CHECK-LABEL: compare_ule_v8i16:
325; NO-SIMD128-NOT: i16x8
326; SIMD128-NEXT: .functype compare_ule_v8i16 (v128, v128) -> (v128){{$}}
327; SIMD128-NEXT: i16x8.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
328; SIMD128-NEXT: return $pop[[R]]{{$}}
329define <8 x i1> @compare_ule_v8i16 (<8 x i16> %x, <8 x i16> %y) {
330  %res = icmp ule <8 x i16> %x, %y
331  ret <8 x i1> %res
332}
333
334; CHECK-LABEL: compare_sext_ule_v8i16:
335; NO-SIMD128-NOT: i16x8
336; SIMD128-NEXT: .functype compare_sext_ule_v8i16 (v128, v128) -> (v128){{$}}
337; SIMD128-NEXT: i16x8.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
338; SIMD128-NEXT: return $pop[[R]]{{$}}
339define <8 x i16> @compare_sext_ule_v8i16 (<8 x i16> %x, <8 x i16> %y) {
340  %cmp = icmp ule <8 x i16> %x, %y
341  %res = sext <8 x i1> %cmp to <8 x i16>
342  ret <8 x i16> %res
343}
344
345; CHECK-LABEL: compare_sgt_v8i16:
346; NO-SIMD128-NOT: i16x8
347; SIMD128-NEXT: .functype compare_sgt_v8i16 (v128, v128) -> (v128){{$}}
348; SIMD128-NEXT: i16x8.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
349; SIMD128-NEXT: return $pop[[R]]{{$}}
350define <8 x i1> @compare_sgt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
351  %res = icmp sgt <8 x i16> %x, %y
352  ret <8 x i1> %res
353}
354
355; CHECK-LABEL: compare_sext_sgt_v8i16:
356; NO-SIMD128-NOT: i16x8
357; SIMD128-NEXT: .functype compare_sext_sgt_v8i16 (v128, v128) -> (v128){{$}}
358; SIMD128-NEXT: i16x8.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
359; SIMD128-NEXT: return $pop[[R]]{{$}}
360define <8 x i16> @compare_sext_sgt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
361  %cmp = icmp sgt <8 x i16> %x, %y
362  %res = sext <8 x i1> %cmp to <8 x i16>
363  ret <8 x i16> %res
364}
365
366; CHECK-LABEL: compare_ugt_v8i16:
367; NO-SIMD128-NOT: i16x8
368; SIMD128-NEXT: .functype compare_ugt_v8i16 (v128, v128) -> (v128){{$}}
369; SIMD128-NEXT: i16x8.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
370; SIMD128-NEXT: return $pop[[R]]{{$}}
371define <8 x i1> @compare_ugt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
372  %res = icmp ugt <8 x i16> %x, %y
373  ret <8 x i1> %res
374}
375
376; CHECK-LABEL: compare_sext_ugt_v8i16:
377; NO-SIMD128-NOT: i16x8
378; SIMD128-NEXT: .functype compare_sext_ugt_v8i16 (v128, v128) -> (v128){{$}}
379; SIMD128-NEXT: i16x8.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
380; SIMD128-NEXT: return $pop[[R]]{{$}}
381define <8 x i16> @compare_sext_ugt_v8i16 (<8 x i16> %x, <8 x i16> %y) {
382  %cmp = icmp ugt <8 x i16> %x, %y
383  %res = sext <8 x i1> %cmp to <8 x i16>
384  ret <8 x i16> %res
385}
386
387; CHECK-LABEL: compare_sge_v8i16:
388; NO-SIMD128-NOT: i16x8
389; SIMD128-NEXT: .functype compare_sge_v8i16 (v128, v128) -> (v128){{$}}
390; SIMD128-NEXT: i16x8.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
391; SIMD128-NEXT: return $pop[[R]]{{$}}
392define <8 x i1> @compare_sge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
393  %res = icmp sge <8 x i16> %x, %y
394  ret <8 x i1> %res
395}
396
397; CHECK-LABEL: compare_sext_sge_v8i16:
398; NO-SIMD128-NOT: i16x8
399; SIMD128-NEXT: .functype compare_sext_sge_v8i16 (v128, v128) -> (v128){{$}}
400; SIMD128-NEXT: i16x8.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
401; SIMD128-NEXT: return $pop[[R]]{{$}}
402define <8 x i16> @compare_sext_sge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
403  %cmp = icmp sge <8 x i16> %x, %y
404  %res = sext <8 x i1> %cmp to <8 x i16>
405  ret <8 x i16> %res
406}
407
408; CHECK-LABEL: compare_uge_v8i16:
409; NO-SIMD128-NOT: i16x8
410; SIMD128-NEXT: .functype compare_uge_v8i16 (v128, v128) -> (v128){{$}}
411; SIMD128-NEXT: i16x8.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
412; SIMD128-NEXT: return $pop[[R]]{{$}}
413define <8 x i1> @compare_uge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
414  %res = icmp uge <8 x i16> %x, %y
415  ret <8 x i1> %res
416}
417
418; CHECK-LABEL: compare_sext_uge_v8i16:
419; NO-SIMD128-NOT: i16x8
420; SIMD128-NEXT: .functype compare_sext_uge_v8i16 (v128, v128) -> (v128){{$}}
421; SIMD128-NEXT: i16x8.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
422; SIMD128-NEXT: return $pop[[R]]{{$}}
423define <8 x i16> @compare_sext_uge_v8i16 (<8 x i16> %x, <8 x i16> %y) {
424  %cmp = icmp uge <8 x i16> %x, %y
425  %res = sext <8 x i1> %cmp to <8 x i16>
426  ret <8 x i16> %res
427}
428
429; CHECK-LABEL: compare_eq_v4i32:
430; NO-SIMD128-NOT: i32x4
431; SIMD128-NEXT: .functype compare_eq_v4i32 (v128, v128) -> (v128){{$}}
432; SIMD128-NEXT: i32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
433; SIMD128-NEXT: return $pop[[R]]{{$}}
434define <4 x i1> @compare_eq_v4i32 (<4 x i32> %x, <4 x i32> %y) {
435  %res = icmp eq <4 x i32> %x, %y
436  ret <4 x i1> %res
437}
438
439; CHECK-LABEL: compare_sext_eq_v4i32:
440; NO-SIMD128-NOT: i32x4
441; SIMD128-NEXT: .functype compare_sext_eq_v4i32 (v128, v128) -> (v128){{$}}
442; SIMD128-NEXT: i32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
443; SIMD128-NEXT: return $pop[[R]]{{$}}
444define <4 x i32> @compare_sext_eq_v4i32 (<4 x i32> %x, <4 x i32> %y) {
445  %cmp = icmp eq <4 x i32> %x, %y
446  %res = sext <4 x i1> %cmp to <4 x i32>
447  ret <4 x i32> %res
448}
449
450; CHECK-LABEL: compare_ne_v4i32:
451; NO-SIMD128-NOT: i32x4
452; SIMD128-NEXT: .functype compare_ne_v4i32 (v128, v128) -> (v128){{$}}
453; SIMD128-NEXT: i32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
454; SIMD128-NEXT: return $pop[[R]]{{$}}
455define <4 x i1> @compare_ne_v4i32 (<4 x i32> %x, <4 x i32> %y) {
456  %res = icmp ne <4 x i32> %x, %y
457  ret <4 x i1> %res
458}
459
460; CHECK-LABEL: compare_sext_ne_v4i32:
461; NO-SIMD128-NOT: i32x4
462; SIMD128-NEXT: .functype compare_sext_ne_v4i32 (v128, v128) -> (v128){{$}}
463; SIMD128-NEXT: i32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
464; SIMD128-NEXT: return $pop[[R]]{{$}}
465define <4 x i32> @compare_sext_ne_v4i32 (<4 x i32> %x, <4 x i32> %y) {
466  %cmp = icmp ne <4 x i32> %x, %y
467  %res = sext <4 x i1> %cmp to <4 x i32>
468  ret <4 x i32> %res
469}
470
471; CHECK-LABEL: compare_slt_v4i32:
472; NO-SIMD128-NOT: i32x4
473; SIMD128-NEXT: .functype compare_slt_v4i32 (v128, v128) -> (v128){{$}}
474; SIMD128-NEXT: i32x4.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
475; SIMD128-NEXT: return $pop[[R]]{{$}}
476define <4 x i1> @compare_slt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
477  %res = icmp slt <4 x i32> %x, %y
478  ret <4 x i1> %res
479}
480
481; CHECK-LABEL: compare_sext_slt_v4i32:
482; NO-SIMD128-NOT: i32x4
483; SIMD128-NEXT: .functype compare_sext_slt_v4i32 (v128, v128) -> (v128){{$}}
484; SIMD128-NEXT: i32x4.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
485; SIMD128-NEXT: return $pop[[R]]{{$}}
486define <4 x i32> @compare_sext_slt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
487  %cmp = icmp slt <4 x i32> %x, %y
488  %res = sext <4 x i1> %cmp to <4 x i32>
489  ret <4 x i32> %res
490}
491
492; CHECK-LABEL: compare_ult_v4i32:
493; NO-SIMD128-NOT: i32x4
494; SIMD128-NEXT: .functype compare_ult_v4i32 (v128, v128) -> (v128){{$}}
495; SIMD128-NEXT: i32x4.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
496; SIMD128-NEXT: return $pop[[R]]{{$}}
497define <4 x i1> @compare_ult_v4i32 (<4 x i32> %x, <4 x i32> %y) {
498  %res = icmp ult <4 x i32> %x, %y
499  ret <4 x i1> %res
500}
501
502; CHECK-LABEL: compare_sext_ult_v4i32:
503; NO-SIMD128-NOT: i32x4
504; SIMD128-NEXT: .functype compare_sext_ult_v4i32 (v128, v128) -> (v128){{$}}
505; SIMD128-NEXT: i32x4.lt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
506; SIMD128-NEXT: return $pop[[R]]{{$}}
507define <4 x i32> @compare_sext_ult_v4i32 (<4 x i32> %x, <4 x i32> %y) {
508  %cmp = icmp ult <4 x i32> %x, %y
509  %res = sext <4 x i1> %cmp to <4 x i32>
510  ret <4 x i32> %res
511}
512
513; CHECK-LABEL: compare_sle_v4i32:
514; NO-SIMD128-NOT: i32x4
515; SIMD128-NEXT: .functype compare_sle_v4i32 (v128, v128) -> (v128){{$}}
516; SIMD128-NEXT: i32x4.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
517; SIMD128-NEXT: return $pop[[R]]{{$}}
518define <4 x i1> @compare_sle_v4i32 (<4 x i32> %x, <4 x i32> %y) {
519  %res = icmp sle <4 x i32> %x, %y
520  ret <4 x i1> %res
521}
522
523; CHECK-LABEL: compare_sext_sle_v4i32:
524; NO-SIMD128-NOT: i32x4
525; SIMD128-NEXT: .functype compare_sext_sle_v4i32 (v128, v128) -> (v128){{$}}
526; SIMD128-NEXT: i32x4.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
527; SIMD128-NEXT: return $pop[[R]]{{$}}
528define <4 x i32> @compare_sext_sle_v4i32 (<4 x i32> %x, <4 x i32> %y) {
529  %cmp = icmp sle <4 x i32> %x, %y
530  %res = sext <4 x i1> %cmp to <4 x i32>
531  ret <4 x i32> %res
532}
533
534; CHECK-LABEL: compare_ule_v4i32:
535; NO-SIMD128-NOT: i32x4
536; SIMD128-NEXT: .functype compare_ule_v4i32 (v128, v128) -> (v128){{$}}
537; SIMD128-NEXT: i32x4.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
538; SIMD128-NEXT: return $pop[[R]]{{$}}
539define <4 x i1> @compare_ule_v4i32 (<4 x i32> %x, <4 x i32> %y) {
540  %res = icmp ule <4 x i32> %x, %y
541  ret <4 x i1> %res
542}
543
544; CHECK-LABEL: compare_sext_ule_v4i32:
545; NO-SIMD128-NOT: i32x4
546; SIMD128-NEXT: .functype compare_sext_ule_v4i32 (v128, v128) -> (v128){{$}}
547; SIMD128-NEXT: i32x4.le_u $push[[R:[0-9]+]]=, $0, $1{{$}}
548; SIMD128-NEXT: return $pop[[R]]{{$}}
549define <4 x i32> @compare_sext_ule_v4i32 (<4 x i32> %x, <4 x i32> %y) {
550  %cmp = icmp ule <4 x i32> %x, %y
551  %res = sext <4 x i1> %cmp to <4 x i32>
552  ret <4 x i32> %res
553}
554
555; CHECK-LABEL: compare_sgt_v4i32:
556; NO-SIMD128-NOT: i32x4
557; SIMD128-NEXT: .functype compare_sgt_v4i32 (v128, v128) -> (v128){{$}}
558; SIMD128-NEXT: i32x4.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
559; SIMD128-NEXT: return $pop[[R]]{{$}}
560define <4 x i1> @compare_sgt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
561  %res = icmp sgt <4 x i32> %x, %y
562  ret <4 x i1> %res
563}
564
565; CHECK-LABEL: compare_sext_sgt_v4i32:
566; NO-SIMD128-NOT: i32x4
567; SIMD128-NEXT: .functype compare_sext_sgt_v4i32 (v128, v128) -> (v128){{$}}
568; SIMD128-NEXT: i32x4.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
569; SIMD128-NEXT: return $pop[[R]]{{$}}
570define <4 x i32> @compare_sext_sgt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
571  %cmp = icmp sgt <4 x i32> %x, %y
572  %res = sext <4 x i1> %cmp to <4 x i32>
573  ret <4 x i32> %res
574}
575
576; CHECK-LABEL: compare_ugt_v4i32:
577; NO-SIMD128-NOT: i32x4
578; SIMD128-NEXT: .functype compare_ugt_v4i32 (v128, v128) -> (v128){{$}}
579; SIMD128-NEXT: i32x4.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
580; SIMD128-NEXT: return $pop[[R]]{{$}}
581define <4 x i1> @compare_ugt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
582  %res = icmp ugt <4 x i32> %x, %y
583  ret <4 x i1> %res
584}
585
586; CHECK-LABEL: compare_sext_ugt_v4i32:
587; NO-SIMD128-NOT: i32x4
588; SIMD128-NEXT: .functype compare_sext_ugt_v4i32 (v128, v128) -> (v128){{$}}
589; SIMD128-NEXT: i32x4.gt_u $push[[R:[0-9]+]]=, $0, $1{{$}}
590; SIMD128-NEXT: return $pop[[R]]{{$}}
591define <4 x i32> @compare_sext_ugt_v4i32 (<4 x i32> %x, <4 x i32> %y) {
592  %cmp = icmp ugt <4 x i32> %x, %y
593  %res = sext <4 x i1> %cmp to <4 x i32>
594  ret <4 x i32> %res
595}
596
597; CHECK-LABEL: compare_sge_v4i32:
598; NO-SIMD128-NOT: i32x4
599; SIMD128-NEXT: .functype compare_sge_v4i32 (v128, v128) -> (v128){{$}}
600; SIMD128-NEXT: i32x4.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
601; SIMD128-NEXT: return $pop[[R]]{{$}}
602define <4 x i1> @compare_sge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
603  %res = icmp sge <4 x i32> %x, %y
604  ret <4 x i1> %res
605}
606
607; CHECK-LABEL: compare_sext_sge_v4i32:
608; NO-SIMD128-NOT: i32x4
609; SIMD128-NEXT: .functype compare_sext_sge_v4i32 (v128, v128) -> (v128){{$}}
610; SIMD128-NEXT: i32x4.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
611; SIMD128-NEXT: return $pop[[R]]{{$}}
612define <4 x i32> @compare_sext_sge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
613  %cmp = icmp sge <4 x i32> %x, %y
614  %res = sext <4 x i1> %cmp to <4 x i32>
615  ret <4 x i32> %res
616}
617
618; CHECK-LABEL: compare_uge_v4i32:
619; NO-SIMD128-NOT: i32x4
620; SIMD128-NEXT: .functype compare_uge_v4i32 (v128, v128) -> (v128){{$}}
621; SIMD128-NEXT: i32x4.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
622; SIMD128-NEXT: return $pop[[R]]{{$}}
623define <4 x i1> @compare_uge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
624  %res = icmp uge <4 x i32> %x, %y
625  ret <4 x i1> %res
626}
627
628; CHECK-LABEL: compare_sext_uge_v4i32:
629; NO-SIMD128-NOT: i32x4
630; SIMD128-NEXT: .functype compare_sext_uge_v4i32 (v128, v128) -> (v128){{$}}
631; SIMD128-NEXT: i32x4.ge_u $push[[R:[0-9]+]]=, $0, $1{{$}}
632; SIMD128-NEXT: return $pop[[R]]{{$}}
633define <4 x i32> @compare_sext_uge_v4i32 (<4 x i32> %x, <4 x i32> %y) {
634  %cmp = icmp uge <4 x i32> %x, %y
635  %res = sext <4 x i1> %cmp to <4 x i32>
636  ret <4 x i32> %res
637}
638
639; CHECK-LABEL: compare_eq_v2i64:
640; NO-SIMD128-NOT: i64x2
641; SIMD128-NEXT: .functype compare_eq_v2i64 (v128, v128) -> (v128){{$}}
642; SIMD128-NEXT: i64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
643; SIMD128-NEXT: return $pop[[R]]{{$}}
644define <2 x i1> @compare_eq_v2i64 (<2 x i64> %x, <2 x i64> %y) {
645  %res = icmp eq <2 x i64> %x, %y
646  ret <2 x i1> %res
647}
648
649; CHECK-LABEL: compare_sext_eq_v2i64:
650; NO-SIMD128-NOT: i64x2
651; SIMD128-NEXT: .functype compare_sext_eq_v2i64 (v128, v128) -> (v128){{$}}
652; SIMD128-NEXT: i64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
653; SIMD128-NEXT: return $pop[[R]]{{$}}
654define <2 x i64> @compare_sext_eq_v2i64 (<2 x i64> %x, <2 x i64> %y) {
655  %cmp = icmp eq <2 x i64> %x, %y
656  %res = sext <2 x i1> %cmp to <2 x i64>
657  ret <2 x i64> %res
658}
659
660; CHECK-LABEL: compare_ne_v2i64:
661; NO-SIMD128-NOT: i64x2
662; SIMD128-NEXT: .functype compare_ne_v2i64 (v128, v128) -> (v128){{$}}
663; SIMD128-NEXT: i64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
664; SIMD128-NEXT: return $pop[[R]]{{$}}
665define <2 x i1> @compare_ne_v2i64 (<2 x i64> %x, <2 x i64> %y) {
666  %res = icmp ne <2 x i64> %x, %y
667  ret <2 x i1> %res
668}
669
670; CHECK-LABEL: compare_sext_ne_v2i64:
671; NO-SIMD128-NOT: i64x2
672; SIMD128-NEXT: .functype compare_sext_ne_v2i64 (v128, v128) -> (v128){{$}}
673; SIMD128-NEXT: i64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
674; SIMD128-NEXT: return $pop[[R]]{{$}}
675define <2 x i64> @compare_sext_ne_v2i64 (<2 x i64> %x, <2 x i64> %y) {
676  %cmp = icmp ne <2 x i64> %x, %y
677  %res = sext <2 x i1> %cmp to <2 x i64>
678  ret <2 x i64> %res
679}
680
681; CHECK-LABEL: compare_slt_v2i64:
682; NO-SIMD128-NOT: i64x2
683; SIMD128-NEXT: .functype compare_slt_v2i64 (v128, v128) -> (v128){{$}}
684; SIMD128-NEXT: i64x2.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
685; SIMD128-NEXT: return $pop[[R]]{{$}}
686define <2 x i1> @compare_slt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
687  %res = icmp slt <2 x i64> %x, %y
688  ret <2 x i1> %res
689}
690
691; CHECK-LABEL: compare_sext_slt_v2i64:
692; NO-SIMD128-NOT: i64x2
693; SIMD128-NEXT: .functype compare_sext_slt_v2i64 (v128, v128) -> (v128){{$}}
694; SIMD128-NEXT: i64x2.lt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
695; SIMD128-NEXT: return $pop[[R]]{{$}}
696define <2 x i64> @compare_sext_slt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
697  %cmp = icmp slt <2 x i64> %x, %y
698  %res = sext <2 x i1> %cmp to <2 x i64>
699  ret <2 x i64> %res
700}
701
702; CHECK-LABEL: compare_ult_v2i64:
703; SIMD128-NEXT: .functype compare_ult_v2i64 (v128, v128) -> (v128){{$}}
704; SIMD128: i64.lt_u
705define <2 x i1> @compare_ult_v2i64 (<2 x i64> %x, <2 x i64> %y) {
706  %res = icmp ult <2 x i64> %x, %y
707  ret <2 x i1> %res
708}
709
710; CHECK-LABEL: compare_sext_ult_v2i64:
711; SIMD128-NEXT: .functype compare_sext_ult_v2i64 (v128, v128) -> (v128){{$}}
712; SIMD128: i64.lt_u
713define <2 x i64> @compare_sext_ult_v2i64 (<2 x i64> %x, <2 x i64> %y) {
714  %cmp = icmp ult <2 x i64> %x, %y
715  %res = sext <2 x i1> %cmp to <2 x i64>
716  ret <2 x i64> %res
717}
718
719; CHECK-LABEL: compare_sle_v2i64:
720; NO-SIMD128-NOT: i64x2
721; SIMD128-NEXT: .functype compare_sle_v2i64 (v128, v128) -> (v128){{$}}
722; SIMD128-NEXT: i64x2.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
723; SIMD128-NEXT: return $pop[[R]]{{$}}
724define <2 x i1> @compare_sle_v2i64 (<2 x i64> %x, <2 x i64> %y) {
725  %res = icmp sle <2 x i64> %x, %y
726  ret <2 x i1> %res
727}
728
729; CHECK-LABEL: compare_sext_sle_v2i64:
730; NO-SIMD128-NOT: i64x2
731; SIMD128-NEXT: .functype compare_sext_sle_v2i64 (v128, v128) -> (v128){{$}}
732; SIMD128-NEXT: i64x2.le_s $push[[R:[0-9]+]]=, $0, $1{{$}}
733; SIMD128-NEXT: return $pop[[R]]{{$}}
734define <2 x i64> @compare_sext_sle_v2i64 (<2 x i64> %x, <2 x i64> %y) {
735  %cmp = icmp sle <2 x i64> %x, %y
736  %res = sext <2 x i1> %cmp to <2 x i64>
737  ret <2 x i64> %res
738}
739
740; CHECK-LABEL: compare_ule_v2i64:
741; SIMD128-NEXT: .functype compare_ule_v2i64 (v128, v128) -> (v128){{$}}
742; SIMD128: i64.le_u
743define <2 x i1> @compare_ule_v2i64 (<2 x i64> %x, <2 x i64> %y) {
744  %res = icmp ule <2 x i64> %x, %y
745  ret <2 x i1> %res
746}
747
748; CHECK-LABEL: compare_sext_ule_v2i64:
749; SIMD128-NEXT: .functype compare_sext_ule_v2i64 (v128, v128) -> (v128){{$}}
750; SIMD128: i64.le_u
751define <2 x i64> @compare_sext_ule_v2i64 (<2 x i64> %x, <2 x i64> %y) {
752  %cmp = icmp ule <2 x i64> %x, %y
753  %res = sext <2 x i1> %cmp to <2 x i64>
754  ret <2 x i64> %res
755}
756
757; CHECK-LABEL: compare_sgt_v2i64:
758; NO-SIMD128-NOT: i64x2
759; SIMD128-NEXT: .functype compare_sgt_v2i64 (v128, v128) -> (v128){{$}}
760; SIMD128-NEXT: i64x2.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
761; SIMD128-NEXT: return $pop[[R]]{{$}}
762define <2 x i1> @compare_sgt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
763  %res = icmp sgt <2 x i64> %x, %y
764  ret <2 x i1> %res
765}
766
767; CHECK-LABEL: compare_sext_sgt_v2i64:
768; NO-SIMD128-NOT: i64x2
769; SIMD128-NEXT: .functype compare_sext_sgt_v2i64 (v128, v128) -> (v128){{$}}
770; SIMD128-NEXT: i64x2.gt_s $push[[R:[0-9]+]]=, $0, $1{{$}}
771; SIMD128-NEXT: return $pop[[R]]{{$}}
772define <2 x i64> @compare_sext_sgt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
773  %cmp = icmp sgt <2 x i64> %x, %y
774  %res = sext <2 x i1> %cmp to <2 x i64>
775  ret <2 x i64> %res
776}
777
778; CHECK-LABEL: compare_ugt_v2i64:
779; SIMD128-NEXT: .functype compare_ugt_v2i64 (v128, v128) -> (v128){{$}}
780; SIMD128: i64.gt_u
781define <2 x i1> @compare_ugt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
782  %res = icmp ugt <2 x i64> %x, %y
783  ret <2 x i1> %res
784}
785
786; CHECK-LABEL: compare_sext_ugt_v2i64:
787; SIMD128-NEXT: .functype compare_sext_ugt_v2i64 (v128, v128) -> (v128){{$}}
788; SIMD128: i64.gt_u
789define <2 x i64> @compare_sext_ugt_v2i64 (<2 x i64> %x, <2 x i64> %y) {
790  %cmp = icmp ugt <2 x i64> %x, %y
791  %res = sext <2 x i1> %cmp to <2 x i64>
792  ret <2 x i64> %res
793}
794
795; CHECK-LABEL: compare_sge_v2i64:
796; NO-SIMD128-NOT: i64x2
797; SIMD128-NEXT: .functype compare_sge_v2i64 (v128, v128) -> (v128){{$}}
798; SIMD128-NEXT: i64x2.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
799; SIMD128-NEXT: return $pop[[R]]{{$}}
800define <2 x i1> @compare_sge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
801  %res = icmp sge <2 x i64> %x, %y
802  ret <2 x i1> %res
803}
804
805; CHECK-LABEL: compare_sext_sge_v2i64:
806; NO-SIMD128-NOT: i64x2
807; SIMD128-NEXT: .functype compare_sext_sge_v2i64 (v128, v128) -> (v128){{$}}
808; SIMD128-NEXT: i64x2.ge_s $push[[R:[0-9]+]]=, $0, $1{{$}}
809; SIMD128-NEXT: return $pop[[R]]{{$}}
810define <2 x i64> @compare_sext_sge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
811  %cmp = icmp sge <2 x i64> %x, %y
812  %res = sext <2 x i1> %cmp to <2 x i64>
813  ret <2 x i64> %res
814}
815
816; CHECK-LABEL: compare_uge_v2i64:
817; SIMD128-NEXT: .functype compare_uge_v2i64 (v128, v128) -> (v128){{$}}
818; SIMD128: i64.ge_u
819define <2 x i1> @compare_uge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
820  %res = icmp uge <2 x i64> %x, %y
821  ret <2 x i1> %res
822}
823
824; CHECK-LABEL: compare_sext_uge_v2i64:
825; SIMD128-NEXT: .functype compare_sext_uge_v2i64 (v128, v128) -> (v128){{$}}
826; SIMD128: i64.ge_u
827define <2 x i64> @compare_sext_uge_v2i64 (<2 x i64> %x, <2 x i64> %y) {
828  %cmp = icmp uge <2 x i64> %x, %y
829  %res = sext <2 x i1> %cmp to <2 x i64>
830  ret <2 x i64> %res
831}
832
833; CHECK-LABEL: compare_oeq_v4f32:
834; NO-SIMD128-NOT: f32x4
835; SIMD128-NEXT: .functype compare_oeq_v4f32 (v128, v128) -> (v128){{$}}
836; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
837; SIMD128-NEXT: return $pop[[R]]{{$}}
838define <4 x i1> @compare_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
839  %res = fcmp oeq <4 x float> %x, %y
840  ret <4 x i1> %res
841}
842
843; CHECK-LABEL: compare_oeq_nnan_v4f32:
844; NO-SIMD128-NOT: f32x4
845; SIMD128-NEXT: .functype compare_oeq_nnan_v4f32 (v128, v128) -> (v128){{$}}
846; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
847; SIMD128-NEXT: return $pop[[R]]{{$}}
848define <4 x i1> @compare_oeq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
849  %res = fcmp nnan oeq <4 x float> %x, %y
850  ret <4 x i1> %res
851}
852
853; CHECK-LABEL: compare_sext_oeq_v4f32:
854; NO-SIMD128-NOT: f32x4
855; SIMD128-NEXT: .functype compare_sext_oeq_v4f32 (v128, v128) -> (v128){{$}}
856; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
857; SIMD128-NEXT: return $pop[[R]]{{$}}
858define <4 x i32> @compare_sext_oeq_v4f32 (<4 x float> %x, <4 x float> %y) {
859  %cmp = fcmp oeq <4 x float> %x, %y
860  %res = sext <4 x i1> %cmp to <4 x i32>
861  ret <4 x i32> %res
862}
863
864; CHECK-LABEL: compare_sext_oeq_nnan_v4f32:
865; NO-SIMD128-NOT: f32x4
866; SIMD128-NEXT: .functype compare_sext_oeq_nnan_v4f32 (v128, v128) -> (v128){{$}}
867; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
868; SIMD128-NEXT: return $pop[[R]]{{$}}
869define <4 x i32> @compare_sext_oeq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
870  %cmp = fcmp nnan oeq <4 x float> %x, %y
871  %res = sext <4 x i1> %cmp to <4 x i32>
872  ret <4 x i32> %res
873}
874
875; CHECK-LABEL: compare_ogt_v4f32:
876; NO-SIMD128-NOT: f32x4
877; SIMD128-NEXT: .functype compare_ogt_v4f32 (v128, v128) -> (v128){{$}}
878; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
879; SIMD128-NEXT: return $pop[[R]]{{$}}
880define <4 x i1> @compare_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
881  %res = fcmp ogt <4 x float> %x, %y
882  ret <4 x i1> %res
883}
884
885; CHECK-LABEL: compare_ogt_nnan_v4f32:
886; NO-SIMD128-NOT: f32x4
887; SIMD128-NEXT: .functype compare_ogt_nnan_v4f32 (v128, v128) -> (v128){{$}}
888; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
889; SIMD128-NEXT: return $pop[[R]]{{$}}
890define <4 x i1> @compare_ogt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
891  %res = fcmp nnan ogt <4 x float> %x, %y
892  ret <4 x i1> %res
893}
894
895; CHECK-LABEL: compare_sext_ogt_v4f32:
896; NO-SIMD128-NOT: f32x4
897; SIMD128-NEXT: .functype compare_sext_ogt_v4f32 (v128, v128) -> (v128){{$}}
898; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
899; SIMD128-NEXT: return $pop[[R]]{{$}}
900define <4 x i32> @compare_sext_ogt_v4f32 (<4 x float> %x, <4 x float> %y) {
901  %cmp = fcmp ogt <4 x float> %x, %y
902  %res = sext <4 x i1> %cmp to <4 x i32>
903  ret <4 x i32> %res
904}
905
906; CHECK-LABEL: compare_sext_ogt_nnan_v4f32:
907; NO-SIMD128-NOT: f32x4
908; SIMD128-NEXT: .functype compare_sext_ogt_nnan_v4f32 (v128, v128) -> (v128){{$}}
909; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
910; SIMD128-NEXT: return $pop[[R]]{{$}}
911define <4 x i32> @compare_sext_ogt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
912  %cmp = fcmp nnan ogt <4 x float> %x, %y
913  %res = sext <4 x i1> %cmp to <4 x i32>
914  ret <4 x i32> %res
915}
916
917; CHECK-LABEL: compare_oge_v4f32:
918; NO-SIMD128-NOT: f32x4
919; SIMD128-NEXT: .functype compare_oge_v4f32 (v128, v128) -> (v128){{$}}
920; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
921; SIMD128-NEXT: return $pop[[R]]{{$}}
922define <4 x i1> @compare_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
923  %res = fcmp oge <4 x float> %x, %y
924  ret <4 x i1> %res
925}
926
927; CHECK-LABEL: compare_oge_nnan_v4f32:
928; NO-SIMD128-NOT: f32x4
929; SIMD128-NEXT: .functype compare_oge_nnan_v4f32 (v128, v128) -> (v128){{$}}
930; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
931; SIMD128-NEXT: return $pop[[R]]{{$}}
932define <4 x i1> @compare_oge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
933  %res = fcmp nnan oge <4 x float> %x, %y
934  ret <4 x i1> %res
935}
936
937; CHECK-LABEL: compare_sext_oge_v4f32:
938; NO-SIMD128-NOT: f32x4
939; SIMD128-NEXT: .functype compare_sext_oge_v4f32 (v128, v128) -> (v128){{$}}
940; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
941; SIMD128-NEXT: return $pop[[R]]{{$}}
942define <4 x i32> @compare_sext_oge_v4f32 (<4 x float> %x, <4 x float> %y) {
943  %cmp = fcmp oge <4 x float> %x, %y
944  %res = sext <4 x i1> %cmp to <4 x i32>
945  ret <4 x i32> %res
946}
947
948; CHECK-LABEL: compare_sext_oge_nnan_v4f32:
949; NO-SIMD128-NOT: f32x4
950; SIMD128-NEXT: .functype compare_sext_oge_nnan_v4f32 (v128, v128) -> (v128){{$}}
951; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
952; SIMD128-NEXT: return $pop[[R]]{{$}}
953define <4 x i32> @compare_sext_oge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
954  %cmp = fcmp nnan oge <4 x float> %x, %y
955  %res = sext <4 x i1> %cmp to <4 x i32>
956  ret <4 x i32> %res
957}
958
959; CHECK-LABEL: compare_olt_v4f32:
960; NO-SIMD128-NOT: f32x4
961; SIMD128-NEXT: .functype compare_olt_v4f32 (v128, v128) -> (v128){{$}}
962; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
963; SIMD128-NEXT: return $pop[[R]]{{$}}
964define <4 x i1> @compare_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
965  %res = fcmp olt <4 x float> %x, %y
966  ret <4 x i1> %res
967}
968
969; CHECK-LABEL: compare_olt_nnan_v4f32:
970; NO-SIMD128-NOT: f32x4
971; SIMD128-NEXT: .functype compare_olt_nnan_v4f32 (v128, v128) -> (v128){{$}}
972; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
973; SIMD128-NEXT: return $pop[[R]]{{$}}
974define <4 x i1> @compare_olt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
975  %res = fcmp nnan olt <4 x float> %x, %y
976  ret <4 x i1> %res
977}
978
979; CHECK-LABEL: compare_sext_olt_v4f32:
980; NO-SIMD128-NOT: f32x4
981; SIMD128-NEXT: .functype compare_sext_olt_v4f32 (v128, v128) -> (v128){{$}}
982; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
983; SIMD128-NEXT: return $pop[[R]]{{$}}
984define <4 x i32> @compare_sext_olt_v4f32 (<4 x float> %x, <4 x float> %y) {
985  %cmp = fcmp olt <4 x float> %x, %y
986  %res = sext <4 x i1> %cmp to <4 x i32>
987  ret <4 x i32> %res
988}
989
990; CHECK-LABEL: compare_sext_olt_nnan_v4f32:
991; NO-SIMD128-NOT: f32x4
992; SIMD128-NEXT: .functype compare_sext_olt_nnan_v4f32 (v128, v128) -> (v128){{$}}
993; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
994; SIMD128-NEXT: return $pop[[R]]{{$}}
995define <4 x i32> @compare_sext_olt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
996  %cmp = fcmp nnan olt <4 x float> %x, %y
997  %res = sext <4 x i1> %cmp to <4 x i32>
998  ret <4 x i32> %res
999}
1000
1001; CHECK-LABEL: compare_ole_v4f32:
1002; NO-SIMD128-NOT: f32x4
1003; SIMD128-NEXT: .functype compare_ole_v4f32 (v128, v128) -> (v128){{$}}
1004; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1005; SIMD128-NEXT: return $pop[[R]]{{$}}
1006define <4 x i1> @compare_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
1007  %res = fcmp ole <4 x float> %x, %y
1008  ret <4 x i1> %res
1009}
1010
1011; CHECK-LABEL: compare_ole_nnan_v4f32:
1012; NO-SIMD128-NOT: f32x4
1013; SIMD128-NEXT: .functype compare_ole_nnan_v4f32 (v128, v128) -> (v128){{$}}
1014; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1015; SIMD128-NEXT: return $pop[[R]]{{$}}
1016define <4 x i1> @compare_ole_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1017  %res = fcmp nnan ole <4 x float> %x, %y
1018  ret <4 x i1> %res
1019}
1020
1021; CHECK-LABEL: compare_sext_ole_v4f32:
1022; NO-SIMD128-NOT: f32x4
1023; SIMD128-NEXT: .functype compare_sext_ole_v4f32 (v128, v128) -> (v128){{$}}
1024; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1025; SIMD128-NEXT: return $pop[[R]]{{$}}
1026define <4 x i32> @compare_sext_ole_v4f32 (<4 x float> %x, <4 x float> %y) {
1027  %cmp = fcmp ole <4 x float> %x, %y
1028  %res = sext <4 x i1> %cmp to <4 x i32>
1029  ret <4 x i32> %res
1030}
1031
1032; CHECK-LABEL: compare_sext_ole_nnan_v4f32:
1033; NO-SIMD128-NOT: f32x4
1034; SIMD128-NEXT: .functype compare_sext_ole_nnan_v4f32 (v128, v128) -> (v128){{$}}
1035; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1036; SIMD128-NEXT: return $pop[[R]]{{$}}
1037define <4 x i32> @compare_sext_ole_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1038  %cmp = fcmp nnan ole <4 x float> %x, %y
1039  %res = sext <4 x i1> %cmp to <4 x i32>
1040  ret <4 x i32> %res
1041}
1042
1043; CHECK-LABEL: compare_one_v4f32:
1044; NO-SIMD128-NOT: f32x4
1045; SIMD128-NEXT: .functype compare_one_v4f32 (v128, v128) -> (v128){{$}}
1046; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1047; SIMD128-NEXT: f32x4.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1048; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1049; SIMD128-NEXT: return $pop[[R]]{{$}}
1050define <4 x i1> @compare_one_v4f32 (<4 x float> %x, <4 x float> %y) {
1051  %res = fcmp one <4 x float> %x, %y
1052  ret <4 x i1> %res
1053}
1054
1055; CHECK-LABEL: compare_one_nnan_v4f32:
1056; NO-SIMD128-NOT: f32x4
1057; SIMD128-NEXT: .functype compare_one_nnan_v4f32 (v128, v128) -> (v128){{$}}
1058; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1059; SIMD128-NEXT: return $pop[[R]]{{$}}
1060define <4 x i1> @compare_one_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1061  %res = fcmp nnan one <4 x float> %x, %y
1062  ret <4 x i1> %res
1063}
1064
1065; CHECK-LABEL: compare_sext_one_v4f32:
1066; NO-SIMD128-NOT: f32x4
1067; SIMD128-NEXT: .functype compare_sext_one_v4f32 (v128, v128) -> (v128){{$}}
1068; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1069; SIMD128-NEXT: f32x4.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1070; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1071; SIMD128-NEXT: return $pop[[R]]{{$}}
1072define <4 x i32> @compare_sext_one_v4f32 (<4 x float> %x, <4 x float> %y) {
1073  %cmp = fcmp one <4 x float> %x, %y
1074  %res = sext <4 x i1> %cmp to <4 x i32>
1075  ret <4 x i32> %res
1076}
1077
1078; CHECK-LABEL: compare_sext_one_nnan_v4f32:
1079; NO-SIMD128-NOT: f32x4
1080; SIMD128-NEXT: .functype compare_sext_one_nnan_v4f32 (v128, v128) -> (v128){{$}}
1081; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1082; SIMD128-NEXT: return $pop[[R]]{{$}}
1083define <4 x i32> @compare_sext_one_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1084  %cmp = fcmp nnan one <4 x float> %x, %y
1085  %res = sext <4 x i1> %cmp to <4 x i32>
1086  ret <4 x i32> %res
1087}
1088
1089; CHECK-LABEL: compare_ord_v4f32:
1090; NO-SIMD128-NOT: f32x4
1091; SIMD128-NEXT: .functype compare_ord_v4f32 (v128, v128) -> (v128){{$}}
1092; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1093; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1094; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1095; SIMD128-NEXT: return   $pop[[R]]{{$}}
1096define <4 x i1> @compare_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
1097  %res = fcmp ord <4 x float> %x, %y
1098  ret <4 x i1> %res
1099}
1100
1101; CHECK-LABEL: compare_ord_nnan_v4f32:
1102; NO-SIMD128-NOT: f32x4
1103; SIMD128-NEXT: .functype compare_ord_nnan_v4f32 (v128, v128) -> (v128){{$}}
1104; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1105; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1106; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1107; SIMD128-NEXT: return   $pop[[R]]{{$}}
1108define <4 x i1> @compare_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1109  %res = fcmp nnan ord <4 x float> %x, %y
1110  ret <4 x i1> %res
1111}
1112
1113; CHECK-LABEL: compare_sext_ord_v4f32:
1114; NO-SIMD128-NOT: f32x4
1115; SIMD128-NEXT: .functype compare_sext_ord_v4f32 (v128, v128) -> (v128){{$}}
1116; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1117; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1118; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1119; SIMD128-NEXT: return   $pop[[R]]{{$}}
1120define <4 x i32> @compare_sext_ord_v4f32 (<4 x float> %x, <4 x float> %y) {
1121  %cmp = fcmp ord <4 x float> %x, %y
1122  %res = sext <4 x i1> %cmp to <4 x i32>
1123  ret <4 x i32> %res
1124}
1125
1126; CHECK-LABEL: compare_sext_ord_nnan_v4f32:
1127; NO-SIMD128-NOT: f32x4
1128; SIMD128-NEXT: .functype compare_sext_ord_nnan_v4f32 (v128, v128) -> (v128){{$}}
1129; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1130; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1131; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1132; SIMD128-NEXT: return   $pop[[R]]{{$}}
1133define <4 x i32> @compare_sext_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1134  %cmp = fcmp nnan ord <4 x float> %x, %y
1135  %res = sext <4 x i1> %cmp to <4 x i32>
1136  ret <4 x i32> %res
1137}
1138
1139; CHECK-LABEL: compare_ueq_v4f32:
1140; NO-SIMD128-NOT: f32x4
1141; SIMD128-NEXT: .functype compare_ueq_v4f32 (v128, v128) -> (v128){{$}}
1142; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1143; SIMD128-NEXT: f32x4.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1144; SIMD128-NEXT: v128.or $push[[T2:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1145; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T2]]{{$}}
1146; SIMD128-NEXT: return $pop[[R]]{{$}}
1147define <4 x i1> @compare_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
1148  %res = fcmp ueq <4 x float> %x, %y
1149  ret <4 x i1> %res
1150}
1151
1152; CHECK-LABEL: compare_ueq_nnan_v4f32:
1153; NO-SIMD128-NOT: f32x4
1154; SIMD128-NEXT: .functype compare_ueq_nnan_v4f32 (v128, v128) -> (v128){{$}}
1155; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1156; SIMD128-NEXT: return $pop[[R]]{{$}}
1157define <4 x i1> @compare_ueq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1158  %res = fcmp nnan ueq <4 x float> %x, %y
1159  ret <4 x i1> %res
1160}
1161
1162; CHECK-LABEL: compare_sext_ueq_v4f32:
1163; NO-SIMD128-NOT: f32x4
1164; SIMD128-NEXT: .functype compare_sext_ueq_v4f32 (v128, v128) -> (v128){{$}}
1165; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1166; SIMD128-NEXT: f32x4.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1167; SIMD128-NEXT: v128.or $push[[T2:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1168; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T2]]{{$}}
1169; SIMD128-NEXT: return $pop[[R]]
1170define <4 x i32> @compare_sext_ueq_v4f32 (<4 x float> %x, <4 x float> %y) {
1171  %cmp = fcmp ueq <4 x float> %x, %y
1172  %res = sext <4 x i1> %cmp to <4 x i32>
1173  ret <4 x i32> %res
1174}
1175
1176; CHECK-LABEL: compare_sext_ueq_nnan_v4f32:
1177; NO-SIMD128-NOT: f32x4
1178; SIMD128-NEXT: .functype compare_sext_ueq_nnan_v4f32 (v128, v128) -> (v128){{$}}
1179; SIMD128-NEXT: f32x4.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1180; SIMD128-NEXT: return $pop[[R]]
1181define <4 x i32> @compare_sext_ueq_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1182  %cmp = fcmp nnan ueq <4 x float> %x, %y
1183  %res = sext <4 x i1> %cmp to <4 x i32>
1184  ret <4 x i32> %res
1185}
1186
1187; CHECK-LABEL: compare_ugt_v4f32:
1188; NO-SIMD128-NOT: f32x4
1189; SIMD128-NEXT: .functype compare_ugt_v4f32 (v128, v128) -> (v128){{$}}
1190; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1191; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1192; SIMD128-NEXT: return $pop[[R]]{{$}}
1193define <4 x i1> @compare_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
1194  %res = fcmp ugt <4 x float> %x, %y
1195  ret <4 x i1> %res
1196}
1197
1198; CHECK-LABEL: compare_ugt_nnan_v4f32:
1199; NO-SIMD128-NOT: f32x4
1200; SIMD128-NEXT: .functype compare_ugt_nnan_v4f32 (v128, v128) -> (v128){{$}}
1201; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1202; SIMD128-NEXT: return $pop[[R]]{{$}}
1203define <4 x i1> @compare_ugt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1204  %res = fcmp nnan ugt <4 x float> %x, %y
1205  ret <4 x i1> %res
1206}
1207
1208; CHECK-LABEL: compare_sext_ugt_v4f32:
1209; NO-SIMD128-NOT: f32x4
1210; SIMD128-NEXT: .functype compare_sext_ugt_v4f32 (v128, v128) -> (v128){{$}}
1211; SIMD128-NEXT: f32x4.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1212; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1213; SIMD128-NEXT: return $pop[[R]]{{$}}
1214define <4 x i32> @compare_sext_ugt_v4f32 (<4 x float> %x, <4 x float> %y) {
1215  %cmp = fcmp ugt <4 x float> %x, %y
1216  %res = sext <4 x i1> %cmp to <4 x i32>
1217  ret <4 x i32> %res
1218}
1219
1220; CHECK-LABEL: compare_sext_ugt_nnan_v4f32:
1221; NO-SIMD128-NOT: f32x4
1222; SIMD128-NEXT: .functype compare_sext_ugt_nnan_v4f32 (v128, v128) -> (v128){{$}}
1223; SIMD128-NEXT: f32x4.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1224; SIMD128-NEXT: return $pop[[R]]{{$}}
1225define <4 x i32> @compare_sext_ugt_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1226  %cmp = fcmp nnan ugt <4 x float> %x, %y
1227  %res = sext <4 x i1> %cmp to <4 x i32>
1228  ret <4 x i32> %res
1229}
1230
1231; CHECK-LABEL: compare_uge_v4f32:
1232; NO-SIMD128-NOT: f32x4
1233; SIMD128-NEXT: .functype compare_uge_v4f32 (v128, v128) -> (v128){{$}}
1234; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1235; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1236; SIMD128-NEXT: return $pop[[R]]{{$}}
1237define <4 x i1> @compare_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
1238  %res = fcmp uge <4 x float> %x, %y
1239  ret <4 x i1> %res
1240}
1241
1242; CHECK-LABEL: compare_uge_nnan_v4f32:
1243; NO-SIMD128-NOT: f32x4
1244; SIMD128-NEXT: .functype compare_uge_nnan_v4f32 (v128, v128) -> (v128){{$}}
1245; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1246; SIMD128-NEXT: return $pop[[R]]{{$}}
1247define <4 x i1> @compare_uge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1248  %res = fcmp nnan uge <4 x float> %x, %y
1249  ret <4 x i1> %res
1250}
1251
1252; CHECK-LABEL: compare_sext_uge_v4f32:
1253; NO-SIMD128-NOT: f32x4
1254; SIMD128-NEXT: .functype compare_sext_uge_v4f32 (v128, v128) -> (v128){{$}}
1255; SIMD128-NEXT: f32x4.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1256; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1257; SIMD128-NEXT: return $pop[[R]]{{$}}
1258define <4 x i32> @compare_sext_uge_v4f32 (<4 x float> %x, <4 x float> %y) {
1259  %cmp = fcmp uge <4 x float> %x, %y
1260  %res = sext <4 x i1> %cmp to <4 x i32>
1261  ret <4 x i32> %res
1262}
1263
1264; CHECK-LABEL: compare_sext_uge_nnan_v4f32:
1265; NO-SIMD128-NOT: f32x4
1266; SIMD128-NEXT: .functype compare_sext_uge_nnan_v4f32 (v128, v128) -> (v128){{$}}
1267; SIMD128-NEXT: f32x4.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1268; SIMD128-NEXT: return $pop[[R]]{{$}}
1269define <4 x i32> @compare_sext_uge_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1270  %cmp = fcmp nnan uge <4 x float> %x, %y
1271  %res = sext <4 x i1> %cmp to <4 x i32>
1272  ret <4 x i32> %res
1273}
1274
1275; CHECK-LABEL: compare_ult_v4f32:
1276; NO-SIMD128-NOT: f32x4
1277; SIMD128-NEXT: .functype compare_ult_v4f32 (v128, v128) -> (v128){{$}}
1278; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1279; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1280; SIMD128-NEXT: return $pop[[R]]{{$}}
1281define <4 x i1> @compare_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
1282  %res = fcmp ult <4 x float> %x, %y
1283  ret <4 x i1> %res
1284}
1285
1286; CHECK-LABEL: compare_ult_nnan_v4f32:
1287; NO-SIMD128-NOT: f32x4
1288; SIMD128-NEXT: .functype compare_ult_nnan_v4f32 (v128, v128) -> (v128){{$}}
1289; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1290; SIMD128-NEXT: return $pop[[R]]{{$}}
1291define <4 x i1> @compare_ult_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1292  %res = fcmp nnan ult <4 x float> %x, %y
1293  ret <4 x i1> %res
1294}
1295
1296; CHECK-LABEL: compare_sext_ult_v4f32:
1297; NO-SIMD128-NOT: f32x4
1298; SIMD128-NEXT: .functype compare_sext_ult_v4f32 (v128, v128) -> (v128){{$}}
1299; SIMD128-NEXT: f32x4.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1300; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1301; SIMD128-NEXT: return $pop[[R]]{{$}}
1302define <4 x i32> @compare_sext_ult_v4f32 (<4 x float> %x, <4 x float> %y) {
1303  %cmp = fcmp ult <4 x float> %x, %y
1304  %res = sext <4 x i1> %cmp to <4 x i32>
1305  ret <4 x i32> %res
1306}
1307
1308; CHECK-LABEL: compare_sext_ult_nnan_v4f32:
1309; NO-SIMD128-NOT: f32x4
1310; SIMD128-NEXT: .functype compare_sext_ult_nnan_v4f32 (v128, v128) -> (v128){{$}}
1311; SIMD128-NEXT: f32x4.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1312; SIMD128-NEXT: return $pop[[R]]{{$}}
1313define <4 x i32> @compare_sext_ult_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1314  %cmp = fcmp nnan ult <4 x float> %x, %y
1315  %res = sext <4 x i1> %cmp to <4 x i32>
1316  ret <4 x i32> %res
1317}
1318
1319; CHECK-LABEL: compare_ule_v4f32:
1320; NO-SIMD128-NOT: f32x4
1321; SIMD128-NEXT: .functype compare_ule_v4f32 (v128, v128) -> (v128){{$}}
1322; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1323; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1324; SIMD128-NEXT: return $pop[[R]]{{$}}
1325define <4 x i1> @compare_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
1326  %res = fcmp ule <4 x float> %x, %y
1327  ret <4 x i1> %res
1328}
1329
1330; CHECK-LABEL: compare_ule_nnan_v4f32:
1331; NO-SIMD128-NOT: f32x4
1332; SIMD128-NEXT: .functype compare_ule_nnan_v4f32 (v128, v128) -> (v128){{$}}
1333; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1334; SIMD128-NEXT: return $pop[[R]]{{$}}
1335define <4 x i1> @compare_ule_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1336  %res = fcmp nnan ule <4 x float> %x, %y
1337  ret <4 x i1> %res
1338}
1339
1340; CHECK-LABEL: compare_sext_ule_v4f32:
1341; NO-SIMD128-NOT: f32x4
1342; SIMD128-NEXT: .functype compare_sext_ule_v4f32 (v128, v128) -> (v128){{$}}
1343; SIMD128-NEXT: f32x4.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1344; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1345; SIMD128-NEXT: return $pop[[R]]{{$}}
1346define <4 x i32> @compare_sext_ule_v4f32 (<4 x float> %x, <4 x float> %y) {
1347  %cmp = fcmp ule <4 x float> %x, %y
1348  %res = sext <4 x i1> %cmp to <4 x i32>
1349  ret <4 x i32> %res
1350}
1351
1352; CHECK-LABEL: compare_sext_ule_nnan_v4f32:
1353; NO-SIMD128-NOT: f32x4
1354; SIMD128-NEXT: .functype compare_sext_ule_nnan_v4f32 (v128, v128) -> (v128){{$}}
1355; SIMD128-NEXT: f32x4.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1356; SIMD128-NEXT: return $pop[[R]]{{$}}
1357define <4 x i32> @compare_sext_ule_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1358  %cmp = fcmp nnan ule <4 x float> %x, %y
1359  %res = sext <4 x i1> %cmp to <4 x i32>
1360  ret <4 x i32> %res
1361}
1362
1363; CHECK-LABEL: compare_une_v4f32:
1364; NO-SIMD128-NOT: f32x4
1365; SIMD128-NEXT: .functype compare_une_v4f32 (v128, v128) -> (v128){{$}}
1366; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}{{$}}
1367; SIMD128-NEXT: return $pop[[R]]{{$}}
1368define <4 x i1> @compare_une_v4f32 (<4 x float> %x, <4 x float> %y) {
1369  %res = fcmp une <4 x float> %x, %y
1370  ret <4 x i1> %res
1371}
1372
1373; CHECK-LABEL: compare_une_nnan_v4f32:
1374; NO-SIMD128-NOT: f32x4
1375; SIMD128-NEXT: .functype compare_une_nnan_v4f32 (v128, v128) -> (v128){{$}}
1376; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}{{$}}
1377; SIMD128-NEXT: return $pop[[R]]{{$}}
1378define <4 x i1> @compare_une_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1379  %res = fcmp nnan une <4 x float> %x, %y
1380  ret <4 x i1> %res
1381}
1382
1383; CHECK-LABEL: compare_sext_une_v4f32:
1384; NO-SIMD128-NOT: f32x4
1385; SIMD128-NEXT: .functype compare_sext_une_v4f32 (v128, v128) -> (v128){{$}}
1386; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1387; SIMD128-NEXT: return $pop[[R]]{{$}}
1388define <4 x i32> @compare_sext_une_v4f32 (<4 x float> %x, <4 x float> %y) {
1389  %cmp = fcmp une <4 x float> %x, %y
1390  %res = sext <4 x i1> %cmp to <4 x i32>
1391  ret <4 x i32> %res
1392}
1393
1394; CHECK-LABEL: compare_sext_une_nnan_v4f32:
1395; NO-SIMD128-NOT: f32x4
1396; SIMD128-NEXT: .functype compare_sext_une_nnan_v4f32 (v128, v128) -> (v128){{$}}
1397; SIMD128-NEXT: f32x4.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1398; SIMD128-NEXT: return $pop[[R]]{{$}}
1399define <4 x i32> @compare_sext_une_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1400  %cmp = fcmp nnan une <4 x float> %x, %y
1401  %res = sext <4 x i1> %cmp to <4 x i32>
1402  ret <4 x i32> %res
1403}
1404
1405; CHECK-LABEL: compare_uno_v4f32:
1406; NO-SIMD128-NOT: f32x4
1407; SIMD128-NEXT: .functype compare_uno_v4f32 (v128, v128) -> (v128){{$}}
1408; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1409; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1410; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1411; SIMD128-NEXT: return $pop[[R]]{{$}}
1412define <4 x i1> @compare_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
1413  %res = fcmp uno <4 x float> %x, %y
1414  ret <4 x i1> %res
1415}
1416
1417; CHECK-LABEL: compare_uno_nnan_v4f32:
1418; NO-SIMD128-NOT: f32x4
1419; SIMD128-NEXT: .functype compare_uno_nnan_v4f32 (v128, v128) -> (v128){{$}}
1420; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1421; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1422; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1423; SIMD128-NEXT: return $pop[[R]]{{$}}
1424define <4 x i1> @compare_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1425  %res = fcmp nnan uno <4 x float> %x, %y
1426  ret <4 x i1> %res
1427}
1428
1429; CHECK-LABEL: compare_sext_uno_v4f32:
1430; NO-SIMD128-NOT: f32x4
1431; SIMD128-NEXT: .functype compare_sext_uno_v4f32 (v128, v128) -> (v128){{$}}
1432; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1433; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1434; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1435; SIMD128-NEXT: return $pop[[R]]{{$}}
1436define <4 x i32> @compare_sext_uno_v4f32 (<4 x float> %x, <4 x float> %y) {
1437  %cmp = fcmp uno <4 x float> %x, %y
1438  %res = sext <4 x i1> %cmp to <4 x i32>
1439  ret <4 x i32> %res
1440}
1441
1442; CHECK-LABEL: compare_sext_uno_nnan_v4f32:
1443; NO-SIMD128-NOT: f32x4
1444; SIMD128-NEXT: .functype compare_sext_uno_nnan_v4f32 (v128, v128) -> (v128){{$}}
1445; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
1446; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
1447; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1448; SIMD128-NEXT: return $pop[[R]]{{$}}
1449define <4 x i32> @compare_sext_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) {
1450  %cmp = fcmp nnan uno <4 x float> %x, %y
1451  %res = sext <4 x i1> %cmp to <4 x i32>
1452  ret <4 x i32> %res
1453}
1454
1455; CHECK-LABEL: compare_oeq_v2f64:
1456; NO-SIMD128-NOT: f64x2
1457; SIMD128-NEXT: .functype compare_oeq_v2f64 (v128, v128) -> (v128){{$}}
1458; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1459; SIMD128-NEXT: return $pop[[R]]{{$}}
1460define <2 x i1> @compare_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1461  %res = fcmp oeq <2 x double> %x, %y
1462  ret <2 x i1> %res
1463}
1464
1465; CHECK-LABEL: compare_oeq_nnan_v2f64:
1466; NO-SIMD128-NOT: f64x2
1467; SIMD128-NEXT: .functype compare_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1468; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1469; SIMD128-NEXT: return $pop[[R]]{{$}}
1470define <2 x i1> @compare_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1471  %res = fcmp nnan oeq <2 x double> %x, %y
1472  ret <2 x i1> %res
1473}
1474
1475; CHECK-LABEL: compare_sext_oeq_v2f64:
1476; NO-SIMD128-NOT: f64x2
1477; SIMD128-NEXT: .functype compare_sext_oeq_v2f64 (v128, v128) -> (v128){{$}}
1478; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1479; SIMD128-NEXT: return $pop[[R]]{{$}}
1480define <2 x i64> @compare_sext_oeq_v2f64 (<2 x double> %x, <2 x double> %y) {
1481  %cmp = fcmp oeq <2 x double> %x, %y
1482  %res = sext <2 x i1> %cmp to <2 x i64>
1483  ret <2 x i64> %res
1484}
1485
1486; CHECK-LABEL: compare_sext_oeq_nnan_v2f64:
1487; NO-SIMD128-NOT: f64x2
1488; SIMD128-NEXT: .functype compare_sext_oeq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1489; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1490; SIMD128-NEXT: return $pop[[R]]{{$}}
1491define <2 x i64> @compare_sext_oeq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1492  %cmp = fcmp nnan oeq <2 x double> %x, %y
1493  %res = sext <2 x i1> %cmp to <2 x i64>
1494  ret <2 x i64> %res
1495}
1496
1497; CHECK-LABEL: compare_ogt_v2f64:
1498; NO-SIMD128-NOT: f64x2
1499; SIMD128-NEXT: .functype compare_ogt_v2f64 (v128, v128) -> (v128){{$}}
1500; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1501; SIMD128-NEXT: return $pop[[R]]{{$}}
1502define <2 x i1> @compare_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1503  %res = fcmp ogt <2 x double> %x, %y
1504  ret <2 x i1> %res
1505}
1506
1507; CHECK-LABEL: compare_ogt_nnan_v2f64:
1508; NO-SIMD128-NOT: f64x2
1509; SIMD128-NEXT: .functype compare_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1510; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1511; SIMD128-NEXT: return $pop[[R]]{{$}}
1512define <2 x i1> @compare_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1513  %res = fcmp nnan ogt <2 x double> %x, %y
1514  ret <2 x i1> %res
1515}
1516
1517; CHECK-LABEL: compare_sext_ogt_v2f64:
1518; NO-SIMD128-NOT: f64x2
1519; SIMD128-NEXT: .functype compare_sext_ogt_v2f64 (v128, v128) -> (v128){{$}}
1520; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1521; SIMD128-NEXT: return $pop[[R]]{{$}}
1522define <2 x i64> @compare_sext_ogt_v2f64 (<2 x double> %x, <2 x double> %y) {
1523  %cmp = fcmp ogt <2 x double> %x, %y
1524  %res = sext <2 x i1> %cmp to <2 x i64>
1525  ret <2 x i64> %res
1526}
1527
1528; CHECK-LABEL: compare_sext_ogt_nnan_v2f64:
1529; NO-SIMD128-NOT: f64x2
1530; SIMD128-NEXT: .functype compare_sext_ogt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1531; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1532; SIMD128-NEXT: return $pop[[R]]{{$}}
1533define <2 x i64> @compare_sext_ogt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1534  %cmp = fcmp nnan ogt <2 x double> %x, %y
1535  %res = sext <2 x i1> %cmp to <2 x i64>
1536  ret <2 x i64> %res
1537}
1538
1539; CHECK-LABEL: compare_oge_v2f64:
1540; NO-SIMD128-NOT: f64x2
1541; SIMD128-NEXT: .functype compare_oge_v2f64 (v128, v128) -> (v128){{$}}
1542; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1543; SIMD128-NEXT: return $pop[[R]]{{$}}
1544define <2 x i1> @compare_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1545  %res = fcmp oge <2 x double> %x, %y
1546  ret <2 x i1> %res
1547}
1548
1549; CHECK-LABEL: compare_oge_nnan_v2f64:
1550; NO-SIMD128-NOT: f64x2
1551; SIMD128-NEXT: .functype compare_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1552; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1553; SIMD128-NEXT: return $pop[[R]]{{$}}
1554define <2 x i1> @compare_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1555  %res = fcmp nnan oge <2 x double> %x, %y
1556  ret <2 x i1> %res
1557}
1558
1559; CHECK-LABEL: compare_sext_oge_v2f64:
1560; NO-SIMD128-NOT: f64x2
1561; SIMD128-NEXT: .functype compare_sext_oge_v2f64 (v128, v128) -> (v128){{$}}
1562; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1563; SIMD128-NEXT: return $pop[[R]]{{$}}
1564define <2 x i64> @compare_sext_oge_v2f64 (<2 x double> %x, <2 x double> %y) {
1565  %cmp = fcmp oge <2 x double> %x, %y
1566  %res = sext <2 x i1> %cmp to <2 x i64>
1567  ret <2 x i64> %res
1568}
1569
1570; CHECK-LABEL: compare_sext_oge_nnan_v2f64:
1571; NO-SIMD128-NOT: f64x2
1572; SIMD128-NEXT: .functype compare_sext_oge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1573; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1574; SIMD128-NEXT: return $pop[[R]]{{$}}
1575define <2 x i64> @compare_sext_oge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1576  %cmp = fcmp nnan oge <2 x double> %x, %y
1577  %res = sext <2 x i1> %cmp to <2 x i64>
1578  ret <2 x i64> %res
1579}
1580
1581; CHECK-LABEL: compare_olt_v2f64:
1582; NO-SIMD128-NOT: f64x2
1583; SIMD128-NEXT: .functype compare_olt_v2f64 (v128, v128) -> (v128){{$}}
1584; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1585; SIMD128-NEXT: return $pop[[R]]{{$}}
1586define <2 x i1> @compare_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1587  %res = fcmp olt <2 x double> %x, %y
1588  ret <2 x i1> %res
1589}
1590
1591; CHECK-LABEL: compare_olt_nnan_v2f64:
1592; NO-SIMD128-NOT: f64x2
1593; SIMD128-NEXT: .functype compare_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1594; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1595; SIMD128-NEXT: return $pop[[R]]{{$}}
1596define <2 x i1> @compare_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1597  %res = fcmp nnan olt <2 x double> %x, %y
1598  ret <2 x i1> %res
1599}
1600
1601; CHECK-LABEL: compare_sext_olt_v2f64:
1602; NO-SIMD128-NOT: f64x2
1603; SIMD128-NEXT: .functype compare_sext_olt_v2f64 (v128, v128) -> (v128){{$}}
1604; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1605; SIMD128-NEXT: return $pop[[R]]{{$}}
1606define <2 x i64> @compare_sext_olt_v2f64 (<2 x double> %x, <2 x double> %y) {
1607  %cmp = fcmp olt <2 x double> %x, %y
1608  %res = sext <2 x i1> %cmp to <2 x i64>
1609  ret <2 x i64> %res
1610}
1611
1612; CHECK-LABEL: compare_sext_olt_nnan_v2f64:
1613; NO-SIMD128-NOT: f64x2
1614; SIMD128-NEXT: .functype compare_sext_olt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1615; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1616; SIMD128-NEXT: return $pop[[R]]{{$}}
1617define <2 x i64> @compare_sext_olt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1618  %cmp = fcmp nnan olt <2 x double> %x, %y
1619  %res = sext <2 x i1> %cmp to <2 x i64>
1620  ret <2 x i64> %res
1621}
1622
1623; CHECK-LABEL: compare_ole_v2f64:
1624; NO-SIMD128-NOT: f64x2
1625; SIMD128-NEXT: .functype compare_ole_v2f64 (v128, v128) -> (v128){{$}}
1626; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1627; SIMD128-NEXT: return $pop[[R]]{{$}}
1628define <2 x i1> @compare_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1629  %res = fcmp ole <2 x double> %x, %y
1630  ret <2 x i1> %res
1631}
1632
1633; CHECK-LABEL: compare_ole_nnan_v2f64:
1634; NO-SIMD128-NOT: f64x2
1635; SIMD128-NEXT: .functype compare_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1636; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1637; SIMD128-NEXT: return $pop[[R]]{{$}}
1638define <2 x i1> @compare_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1639  %res = fcmp nnan ole <2 x double> %x, %y
1640  ret <2 x i1> %res
1641}
1642
1643; CHECK-LABEL: compare_sext_ole_v2f64:
1644; NO-SIMD128-NOT: f64x2
1645; SIMD128-NEXT: .functype compare_sext_ole_v2f64 (v128, v128) -> (v128){{$}}
1646; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1647; SIMD128-NEXT: return $pop[[R]]{{$}}
1648define <2 x i64> @compare_sext_ole_v2f64 (<2 x double> %x, <2 x double> %y) {
1649  %cmp = fcmp ole <2 x double> %x, %y
1650  %res = sext <2 x i1> %cmp to <2 x i64>
1651  ret <2 x i64> %res
1652}
1653
1654; CHECK-LABEL: compare_sext_ole_nnan_v2f64:
1655; NO-SIMD128-NOT: f64x2
1656; SIMD128-NEXT: .functype compare_sext_ole_nnan_v2f64 (v128, v128) -> (v128){{$}}
1657; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1658; SIMD128-NEXT: return $pop[[R]]{{$}}
1659define <2 x i64> @compare_sext_ole_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1660  %cmp = fcmp nnan ole <2 x double> %x, %y
1661  %res = sext <2 x i1> %cmp to <2 x i64>
1662  ret <2 x i64> %res
1663}
1664
1665; CHECK-LABEL: compare_one_v2f64:
1666; NO-SIMD128-NOT: f64x2
1667; SIMD128-NEXT: .functype compare_one_v2f64 (v128, v128) -> (v128){{$}}
1668; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1669; SIMD128-NEXT: f64x2.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1670; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1671; SIMD128-NEXT: return $pop[[R]]{{$}}
1672define <2 x i1> @compare_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1673  %res = fcmp one <2 x double> %x, %y
1674  ret <2 x i1> %res
1675}
1676
1677; CHECK-LABEL: compare_one_nnan_v2f64:
1678; NO-SIMD128-NOT: f64x2
1679; SIMD128-NEXT: .functype compare_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1680; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1681; SIMD128-NEXT: return $pop[[R]]{{$}}
1682define <2 x i1> @compare_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1683  %res = fcmp nnan one <2 x double> %x, %y
1684  ret <2 x i1> %res
1685}
1686
1687; CHECK-LABEL: compare_sext_one_v2f64:
1688; NO-SIMD128-NOT: f64x2
1689; SIMD128-NEXT: .functype compare_sext_one_v2f64 (v128, v128) -> (v128){{$}}
1690; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1691; SIMD128-NEXT: f64x2.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1692; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1693; SIMD128-NEXT: return $pop[[R]]{{$}}
1694define <2 x i64> @compare_sext_one_v2f64 (<2 x double> %x, <2 x double> %y) {
1695  %cmp = fcmp one <2 x double> %x, %y
1696  %res = sext <2 x i1> %cmp to <2 x i64>
1697  ret <2 x i64> %res
1698}
1699
1700; CHECK-LABEL: compare_sext_one_nnan_v2f64:
1701; NO-SIMD128-NOT: f64x2
1702; SIMD128-NEXT: .functype compare_sext_one_nnan_v2f64 (v128, v128) -> (v128){{$}}
1703; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1704; SIMD128-NEXT: return $pop[[R]]{{$}}
1705define <2 x i64> @compare_sext_one_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1706  %cmp = fcmp nnan one <2 x double> %x, %y
1707  %res = sext <2 x i1> %cmp to <2 x i64>
1708  ret <2 x i64> %res
1709}
1710
1711; CHECK-LABEL: compare_ord_v2f64:
1712; NO-SIMD128-NOT: f64x2
1713; SIMD128-NEXT: .functype compare_ord_v2f64 (v128, v128) -> (v128){{$}}
1714; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1715; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1716; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1717; SIMD128-NEXT: return   $pop[[R]]{{$}}
1718define <2 x i1> @compare_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1719  %res = fcmp ord <2 x double> %x, %y
1720  ret <2 x i1> %res
1721}
1722
1723; CHECK-LABEL: compare_ord_nnan_v2f64:
1724; NO-SIMD128-NOT: f64x2
1725; SIMD128-NEXT: .functype compare_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1726; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1727; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1728; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1729; SIMD128-NEXT: return   $pop[[R]]{{$}}
1730define <2 x i1> @compare_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1731  %res = fcmp nnan ord <2 x double> %x, %y
1732  ret <2 x i1> %res
1733}
1734
1735; CHECK-LABEL: compare_sext_ord_v2f64:
1736; NO-SIMD128-NOT: f64x2
1737; SIMD128-NEXT: .functype compare_sext_ord_v2f64 (v128, v128) -> (v128){{$}}
1738; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1739; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1740; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1741; SIMD128-NEXT: return   $pop[[R]]{{$}}
1742define <2 x i64> @compare_sext_ord_v2f64 (<2 x double> %x, <2 x double> %y) {
1743  %cmp = fcmp ord <2 x double> %x, %y
1744  %res = sext <2 x i1> %cmp to <2 x i64>
1745  ret <2 x i64> %res
1746}
1747
1748; CHECK-LABEL: compare_sext_ord_nnan_v2f64:
1749; NO-SIMD128-NOT: f64x2
1750; SIMD128-NEXT: .functype compare_sext_ord_nnan_v2f64 (v128, v128) -> (v128){{$}}
1751; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}}
1752; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}}
1753; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1754; SIMD128-NEXT: return   $pop[[R]]{{$}}
1755define <2 x i64> @compare_sext_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1756  %cmp = fcmp nnan ord <2 x double> %x, %y
1757  %res = sext <2 x i1> %cmp to <2 x i64>
1758  ret <2 x i64> %res
1759}
1760
1761; CHECK-LABEL: compare_ueq_v2f64:
1762; NO-SIMD128-NOT: f64x2
1763; SIMD128-NEXT: .functype compare_ueq_v2f64 (v128, v128) -> (v128){{$}}
1764; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1765; SIMD128-NEXT: f64x2.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1766; SIMD128-NEXT: v128.or $push[[T2:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1767; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T2]]{{$}}
1768; SIMD128-NEXT: return $pop[[R]]{{$}}
1769define <2 x i1> @compare_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1770  %res = fcmp ueq <2 x double> %x, %y
1771  ret <2 x i1> %res
1772}
1773
1774; CHECK-LABEL: compare_ueq_nnan_v2f64:
1775; NO-SIMD128-NOT: f64x2
1776; SIMD128-NEXT: .functype compare_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1777; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1778; SIMD128-NEXT: return $pop[[R]]{{$}}
1779define <2 x i1> @compare_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1780  %res = fcmp nnan ueq <2 x double> %x, %y
1781  ret <2 x i1> %res
1782}
1783
1784; CHECK-LABEL: compare_sext_ueq_v2f64:
1785; NO-SIMD128-NOT: f64x2
1786; SIMD128-NEXT: .functype compare_sext_ueq_v2f64 (v128, v128) -> (v128){{$}}
1787; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1788; SIMD128-NEXT: f64x2.lt $push[[T1:[0-9]+]]=, $0, $1{{$}}
1789; SIMD128-NEXT: v128.or $push[[T2:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
1790; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T2]]{{$}}
1791; SIMD128-NEXT: return $pop[[R]]{{$}}
1792define <2 x i64> @compare_sext_ueq_v2f64 (<2 x double> %x, <2 x double> %y) {
1793  %cmp = fcmp ueq <2 x double> %x, %y
1794  %res = sext <2 x i1> %cmp to <2 x i64>
1795  ret <2 x i64> %res
1796}
1797
1798; CHECK-LABEL: compare_sext_ueq_nnan_v2f64:
1799; NO-SIMD128-NOT: f64x2
1800; SIMD128-NEXT: .functype compare_sext_ueq_nnan_v2f64 (v128, v128) -> (v128){{$}}
1801; SIMD128-NEXT: f64x2.eq $push[[R:[0-9]+]]=, $0, $1{{$}}
1802; SIMD128-NEXT: return $pop[[R]]{{$}}
1803define <2 x i64> @compare_sext_ueq_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1804  %cmp = fcmp nnan ueq <2 x double> %x, %y
1805  %res = sext <2 x i1> %cmp to <2 x i64>
1806  ret <2 x i64> %res
1807}
1808
1809; CHECK-LABEL: compare_ugt_v2f64:
1810; NO-SIMD128-NOT: f64x2
1811; SIMD128-NEXT: .functype compare_ugt_v2f64 (v128, v128) -> (v128){{$}}
1812; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1813; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1814; SIMD128-NEXT: return $pop[[R]]{{$}}
1815define <2 x i1> @compare_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1816  %res = fcmp ugt <2 x double> %x, %y
1817  ret <2 x i1> %res
1818}
1819
1820; CHECK-LABEL: compare_ugt_nnan_v2f64:
1821; NO-SIMD128-NOT: f64x2
1822; SIMD128-NEXT: .functype compare_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1823; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1824; SIMD128-NEXT: return $pop[[R]]{{$}}
1825define <2 x i1> @compare_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1826  %res = fcmp nnan ugt <2 x double> %x, %y
1827  ret <2 x i1> %res
1828}
1829
1830; CHECK-LABEL: compare_sext_ugt_v2f64:
1831; NO-SIMD128-NOT: f64x2
1832; SIMD128-NEXT: .functype compare_sext_ugt_v2f64 (v128, v128) -> (v128){{$}}
1833; SIMD128-NEXT: f64x2.le $push[[T0:[0-9]+]]=, $0, $1{{$}}
1834; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1835; SIMD128-NEXT: return $pop[[R]]{{$}}
1836define <2 x i64> @compare_sext_ugt_v2f64 (<2 x double> %x, <2 x double> %y) {
1837  %cmp = fcmp ugt <2 x double> %x, %y
1838  %res = sext <2 x i1> %cmp to <2 x i64>
1839  ret <2 x i64> %res
1840}
1841
1842; CHECK-LABEL: compare_sext_ugt_nnan_v2f64:
1843; NO-SIMD128-NOT: f64x2
1844; SIMD128-NEXT: .functype compare_sext_ugt_nnan_v2f64 (v128, v128) -> (v128){{$}}
1845; SIMD128-NEXT: f64x2.gt $push[[R:[0-9]+]]=, $0, $1{{$}}
1846; SIMD128-NEXT: return $pop[[R]]{{$}}
1847define <2 x i64> @compare_sext_ugt_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1848  %cmp = fcmp nnan ugt <2 x double> %x, %y
1849  %res = sext <2 x i1> %cmp to <2 x i64>
1850  ret <2 x i64> %res
1851}
1852
1853; CHECK-LABEL: compare_uge_v2f64:
1854; NO-SIMD128-NOT: f64x2
1855; SIMD128-NEXT: .functype compare_uge_v2f64 (v128, v128) -> (v128){{$}}
1856; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1857; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1858; SIMD128-NEXT: return $pop[[R]]{{$}}
1859define <2 x i1> @compare_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1860  %res = fcmp uge <2 x double> %x, %y
1861  ret <2 x i1> %res
1862}
1863
1864; CHECK-LABEL: compare_uge_nnan_v2f64:
1865; NO-SIMD128-NOT: f64x2
1866; SIMD128-NEXT: .functype compare_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1867; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1868; SIMD128-NEXT: return $pop[[R]]{{$}}
1869define <2 x i1> @compare_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1870  %res = fcmp nnan uge <2 x double> %x, %y
1871  ret <2 x i1> %res
1872}
1873
1874; CHECK-LABEL: compare_sext_uge_v2f64:
1875; NO-SIMD128-NOT: f64x2
1876; SIMD128-NEXT: .functype compare_sext_uge_v2f64 (v128, v128) -> (v128){{$}}
1877; SIMD128-NEXT: f64x2.lt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1878; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1879; SIMD128-NEXT: return $pop[[R]]{{$}}
1880define <2 x i64> @compare_sext_uge_v2f64 (<2 x double> %x, <2 x double> %y) {
1881  %cmp = fcmp uge <2 x double> %x, %y
1882  %res = sext <2 x i1> %cmp to <2 x i64>
1883  ret <2 x i64> %res
1884}
1885
1886; CHECK-LABEL: compare_sext_uge_nnan_v2f64:
1887; NO-SIMD128-NOT: f64x2
1888; SIMD128-NEXT: .functype compare_sext_uge_nnan_v2f64 (v128, v128) -> (v128){{$}}
1889; SIMD128-NEXT: f64x2.ge $push[[R:[0-9]+]]=, $0, $1{{$}}
1890; SIMD128-NEXT: return $pop[[R]]{{$}}
1891define <2 x i64> @compare_sext_uge_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1892  %cmp = fcmp nnan uge <2 x double> %x, %y
1893  %res = sext <2 x i1> %cmp to <2 x i64>
1894  ret <2 x i64> %res
1895}
1896
1897; CHECK-LABEL: compare_ult_v2f64:
1898; NO-SIMD128-NOT: f64x2
1899; SIMD128-NEXT: .functype compare_ult_v2f64 (v128, v128) -> (v128){{$}}
1900; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1901; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1902; SIMD128-NEXT: return $pop[[R]]{{$}}
1903define <2 x i1> @compare_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1904  %res = fcmp ult <2 x double> %x, %y
1905  ret <2 x i1> %res
1906}
1907
1908; CHECK-LABEL: compare_ult_nnan_v2f64:
1909; NO-SIMD128-NOT: f64x2
1910; SIMD128-NEXT: .functype compare_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1911; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1912; SIMD128-NEXT: return $pop[[R]]{{$}}
1913define <2 x i1> @compare_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1914  %res = fcmp nnan ult <2 x double> %x, %y
1915  ret <2 x i1> %res
1916}
1917
1918; CHECK-LABEL: compare_sext_ult_v2f64:
1919; NO-SIMD128-NOT: f64x2
1920; SIMD128-NEXT: .functype compare_sext_ult_v2f64 (v128, v128) -> (v128){{$}}
1921; SIMD128-NEXT: f64x2.ge $push[[T0:[0-9]+]]=, $0, $1{{$}}
1922; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1923; SIMD128-NEXT: return $pop[[R]]{{$}}
1924define <2 x i64> @compare_sext_ult_v2f64 (<2 x double> %x, <2 x double> %y) {
1925  %cmp = fcmp ult <2 x double> %x, %y
1926  %res = sext <2 x i1> %cmp to <2 x i64>
1927  ret <2 x i64> %res
1928}
1929
1930; CHECK-LABEL: compare_sext_ult_nnan_v2f64:
1931; NO-SIMD128-NOT: f64x2
1932; SIMD128-NEXT: .functype compare_sext_ult_nnan_v2f64 (v128, v128) -> (v128){{$}}
1933; SIMD128-NEXT: f64x2.lt $push[[R:[0-9]+]]=, $0, $1{{$}}
1934; SIMD128-NEXT: return $pop[[R]]{{$}}
1935define <2 x i64> @compare_sext_ult_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1936  %cmp = fcmp nnan ult <2 x double> %x, %y
1937  %res = sext <2 x i1> %cmp to <2 x i64>
1938  ret <2 x i64> %res
1939}
1940
1941; CHECK-LABEL: compare_ule_v2f64:
1942; NO-SIMD128-NOT: f64x2
1943; SIMD128-NEXT: .functype compare_ule_v2f64 (v128, v128) -> (v128){{$}}
1944; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1945; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1946; SIMD128-NEXT: return $pop[[R]]{{$}}
1947define <2 x i1> @compare_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1948  %res = fcmp ule <2 x double> %x, %y
1949  ret <2 x i1> %res
1950}
1951
1952; CHECK-LABEL: compare_ule_nnan_v2f64:
1953; NO-SIMD128-NOT: f64x2
1954; SIMD128-NEXT: .functype compare_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1955; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1956; SIMD128-NEXT: return $pop[[R]]{{$}}
1957define <2 x i1> @compare_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1958  %res = fcmp nnan ule <2 x double> %x, %y
1959  ret <2 x i1> %res
1960}
1961
1962; CHECK-LABEL: compare_sext_ule_v2f64:
1963; NO-SIMD128-NOT: f64x2
1964; SIMD128-NEXT: .functype compare_sext_ule_v2f64 (v128, v128) -> (v128){{$}}
1965; SIMD128-NEXT: f64x2.gt $push[[T0:[0-9]+]]=, $0, $1{{$}}
1966; SIMD128-NEXT: v128.not $push[[R:[0-9]+]]=, $pop[[T0]]{{$}}
1967; SIMD128-NEXT: return $pop[[R]]{{$}}
1968define <2 x i64> @compare_sext_ule_v2f64 (<2 x double> %x, <2 x double> %y) {
1969  %cmp = fcmp ule <2 x double> %x, %y
1970  %res = sext <2 x i1> %cmp to <2 x i64>
1971  ret <2 x i64> %res
1972}
1973
1974; CHECK-LABEL: compare_sext_ule_nnan_v2f64:
1975; NO-SIMD128-NOT: f64x2
1976; SIMD128-NEXT: .functype compare_sext_ule_nnan_v2f64 (v128, v128) -> (v128){{$}}
1977; SIMD128-NEXT: f64x2.le $push[[R:[0-9]+]]=, $0, $1{{$}}
1978; SIMD128-NEXT: return $pop[[R]]{{$}}
1979define <2 x i64> @compare_sext_ule_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
1980  %cmp = fcmp nnan ule <2 x double> %x, %y
1981  %res = sext <2 x i1> %cmp to <2 x i64>
1982  ret <2 x i64> %res
1983}
1984
1985; CHECK-LABEL: compare_une_v2f64:
1986; NO-SIMD128-NOT: f64x2
1987; SIMD128-NEXT: .functype compare_une_v2f64 (v128, v128) -> (v128){{$}}
1988; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1989; SIMD128-NEXT: return $pop[[R]]{{$}}
1990define <2 x i1> @compare_une_v2f64 (<2 x double> %x, <2 x double> %y) {
1991  %res = fcmp une <2 x double> %x, %y
1992  ret <2 x i1> %res
1993}
1994
1995; CHECK-LABEL: compare_une_nnan_v2f64:
1996; NO-SIMD128-NOT: f64x2
1997; SIMD128-NEXT: .functype compare_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
1998; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
1999; SIMD128-NEXT: return $pop[[R]]{{$}}
2000define <2 x i1> @compare_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2001  %res = fcmp nnan une <2 x double> %x, %y
2002  ret <2 x i1> %res
2003}
2004
2005; CHECK-LABEL: compare_sext_une_v2f64:
2006; NO-SIMD128-NOT: f64x2
2007; SIMD128-NEXT: .functype compare_sext_une_v2f64 (v128, v128) -> (v128){{$}}
2008; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
2009; SIMD128-NEXT: return $pop[[R]]{{$}}
2010define <2 x i64> @compare_sext_une_v2f64 (<2 x double> %x, <2 x double> %y) {
2011  %cmp = fcmp une <2 x double> %x, %y
2012  %res = sext <2 x i1> %cmp to <2 x i64>
2013  ret <2 x i64> %res
2014}
2015
2016; CHECK-LABEL: compare_sext_une_nnan_v2f64:
2017; NO-SIMD128-NOT: f64x2
2018; SIMD128-NEXT: .functype compare_sext_une_nnan_v2f64 (v128, v128) -> (v128){{$}}
2019; SIMD128-NEXT: f64x2.ne $push[[R:[0-9]+]]=, $0, $1{{$}}
2020; SIMD128-NEXT: return $pop[[R]]{{$}}
2021define <2 x i64> @compare_sext_une_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2022  %cmp = fcmp nnan une <2 x double> %x, %y
2023  %res = sext <2 x i1> %cmp to <2 x i64>
2024  ret <2 x i64> %res
2025}
2026
2027; CHECK-LABEL: compare_uno_v2f64:
2028; NO-SIMD128-NOT: f64x2
2029; SIMD128-NEXT: .functype compare_uno_v2f64 (v128, v128) -> (v128){{$}}
2030; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2031; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2032; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2033; SIMD128-NEXT: return $pop[[R]]{{$}}
2034define <2 x i1> @compare_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
2035  %res = fcmp uno <2 x double> %x, %y
2036  ret <2 x i1> %res
2037}
2038
2039; CHECK-LABEL: compare_uno_nnan_v2f64:
2040; NO-SIMD128-NOT: f64x2
2041; SIMD128-NEXT: .functype compare_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
2042; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2043; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2044; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2045; SIMD128-NEXT: return $pop[[R]]{{$}}
2046define <2 x i1> @compare_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2047  %res = fcmp nnan uno <2 x double> %x, %y
2048  ret <2 x i1> %res
2049}
2050
2051; CHECK-LABEL: compare_sext_uno_v2f64:
2052; NO-SIMD128-NOT: f64x2
2053; SIMD128-NEXT: .functype compare_sext_uno_v2f64 (v128, v128) -> (v128){{$}}
2054; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2055; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2056; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2057; SIMD128-NEXT: return $pop[[R]]{{$}}
2058define <2 x i64> @compare_sext_uno_v2f64 (<2 x double> %x, <2 x double> %y) {
2059  %cmp = fcmp uno <2 x double> %x, %y
2060  %res = sext <2 x i1> %cmp to <2 x i64>
2061  ret <2 x i64> %res
2062}
2063
2064; CHECK-LABEL: compare_sext_uno_nnan_v2f64:
2065; NO-SIMD128-NOT: f64x2
2066; SIMD128-NEXT: .functype compare_sext_uno_nnan_v2f64 (v128, v128) -> (v128){{$}}
2067; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}}
2068; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}}
2069; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}}
2070; SIMD128-NEXT: return $pop[[R]]{{$}}
2071define <2 x i64> @compare_sext_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) {
2072  %cmp = fcmp nnan uno <2 x double> %x, %y
2073  %res = sext <2 x i1> %cmp to <2 x i64>
2074  ret <2 x i64> %res
2075}
2076